How to get values from UI elements?
-
Working with the Variable object, how can I get attributes, e.g. rgb color values from the ColorWell?
What I’d like to do is to pick values for one graphic element with the UI and calculate the colors of other elements depending on that first color.
Is there a documentation where I can find more information on the Variable object?
Variable([ dict(name="color", ui="ColorWell")], globals()) fill(color) rect(0,0,1000,1000) print(color) # how to get those values?
-
It seems @benkiel answered exactly this question one year ago.
https://forum.drawbot.com/topic/297/getting-rgba-values-from-a-variables-colorwell
🥳
-
Thanks! I didn’t see that one.