Hi
I just tried to find a way to change UI colors through python scripting and do not find a way to access all UI color options.
For example, I want to be able to change:
Options Appearance Custom Colors →
General → Content Background, Frame Background and so on
Or is there another way, say through an options.ini file, where I can set custom colors for that? (I tried exporting my custom options.ini but do not find the “General” options to change said colors).
I also tried using _-Options through scripting to do a “command line” attempt on changing these values but they (Custom coloring for content background) do not appear in the list.
Would very much appreciate a hint on how to achieve that
You can easily change the UI color by using the SetPaintColor method like this:
from Rhino.ApplicationSettings import AppearanceSettings, PaintColor
from System.Drawing import Color
AppearanceSettings.SetPaintColor(PaintColor.ActiveViewportTitle, Color.Red, True)
Thank you Mahdiyar for showing me another method accessing colors.
Unfortunately it seems that in Rhino 8 I still can not get access to all custom colors. Specifically if I want to change “Content Background”, there seems to be no value for me to change it. Do you know maybe a workaround in Rhino 8? Thank you
I just wanted to update my Dark Theme I made for Rhino 7 (There it worked by exporting/importing the Rhino Options.ini) and translate it to Rhino 8. And yes, as you said, there are not all theme colors exposed yet as it seems. Thank you for clarifying, that way I do not search for things that are not there yet
I’ll check if Eto is something that helps for custom UI colors this evening.
After a quick glance it seems that Eto does not solve what I want to do. I just want to change the Custom Theme colors, save them and import them again somehow. Means, I have to wait for exposure of all theme colors into the export/import options or until they are in RhinoCommon.
I thought that PaintColor.PanelBackground would do what you want but I don’t see any change when I run this:
from Rhino.ApplicationSettings import AppearanceSettings, PaintColor
from System.Drawing import Color
test_before=AppearanceSettings.GetPaintColor(PaintColor.PanelBackground)
AppearanceSettings.SetPaintColor(PaintColor.PanelBackground, Color.Beige, True)
test_after=AppearanceSettings.GetPaintColor(PaintColor.PanelBackground)
test_before and test_after appear to be the same color - which is incidentally the same color as the default “Content background” in light mode - 255,233,235,239.