Pyrevit toolbar extension, can you color the panel?

Pyrevit toolbar extension, can you color the panel?

nlgMU4UN
Explorer Explorer
971 Views
6 Replies
Message 1 of 7

Pyrevit toolbar extension, can you color the panel?

nlgMU4UN
Explorer
Explorer

Hi im creating a toolbar via. learnrevitapi.com

and im wondering how do you change the color of the panel (the marked area)

im using pycharm 

pyrevit toolbar .png

 

Like this:

nlgMU4UN_1-1725284049924.png

 

 

0 Likes
Accepted solutions (1)
972 Views
6 Replies
Replies (6)
Message 2 of 7

lee6800
Contributor
Contributor

you might be better off asking this on pyrevit forum

https://discourse.pyrevitlabs.io/ 

I beliver this can be achived by placing a "yaml" file within the panel folder

search for background in this page https://pyrevitlabs.notion.site/pyRevit-Bundles-12323e3090904d9aa7cdc3d82095d3e3#1322635d84f447019ac... 

0 Likes
Message 3 of 7

lee6800
Contributor
Contributor
Accepted solution

Here is an example,

in the yaml file i have:

background:
    title: '#00ffff'

 

lee6800_0-1725287278684.png

and here is the result 

lee6800_1-1725287452461.png

 

 

Message 4 of 7

nlgMU4UN
Explorer
Explorer

Thx 🙂

0 Likes
Message 5 of 7

Bramdejong1985
Observer
Observer

This can be achieved by adding a background color in the bundle.yaml file for each panel in your tab. 
this is an example from mine:   (see the screenshot) 

 

title:
  en_us: BDJ-Dynamo
layout:
  - 1 - menu
  - 2 - BDJ2
  - 3 - Controls
  - 5 - Views
background:
  title: '#4d74b78a'
# set background for all parts
#background: '#ff0000'
# or for individual parts
#background:
  #panel: '#ff0000'
  #title: '#00ff00'
  #slideout: '#0000ff'
author: Bram de Jong (IDG)
 
 
 
you can either set a color for the entire background of the panel, or you can specify which color the Title needs to be (as Ive done in my toolbar), the panel itself and the slideout (if you have one)

Hope this helps and makes sense. 
 
PS:  I use https//rgb.to for colors. 
Remember that adding ff in front of your HEX coloring gives you a non-transparant color, while adding 4d in front, it gives a slightly transparant color. 
0 Likes
Message 6 of 7

Rafael_MartinezV
Enthusiast
Enthusiast

@Bramdejong1985 

 

could you explain a bit more on the FF vs 4d?

 

I tried using the website you mentioned but confused as to how to make the colors transparent.

 

for instance, red

#ff0000 would be #4d0000? but i get a dark purple brown color

 

is this right?

0 Likes
Message 7 of 7

Rafael_MartinezV
Enthusiast
Enthusiast

nevermind, i was able to figure out the meanings

 

0 Likes