Access Grasshopper Document Preview Setting via script

Is it possible to change Normal and Preview colors of current GH document via code? I like to make a component that if I add that in the canvas these two colors will be changed to my colors.

This GhPython script seems to work:


250414_PreviewColours_GhPython_00.gh (3.6 KB)

4 Likes

Thank you! Works perfectly!

1 Like

May I ask one more favor? I also like to change all the group color to my color, is that possible?

This should do it:


250414_PreviewColours_GhPython_01.gh (6.1 KB)

1 Like

WOW! Thank you very much, it works like a charm!

1 Like