Changing colour of a component using a variable

Robert Brown shared this question 5 years ago

Is it possible to change the background of a component or rectangle based on a value stored in variable?

Comments (1)


Hello Robert,

While you can't use the value to specify the color the component will be changed to, you may use it a condition to determine the next step. For example, if you have a variable with the value 'blue', then you can have a change style event for the component with the following condition:

When variable = blue, change style [background] to the color blue [user selects blue from color picker]