ruiz86
6
There are several ways to do this. You can use conditionals on elements saying that “if something is true, then the color should be X or Y.” And you can use various ways to store the variable that will define the color, such as custom states, URL parameters, and data in the database. In the case of using a custom state, you will do the following:
1 - Create a custom state on an element 2 - Create a Workflow with the action “set state of an element” and set the value to what you want 3 - On the element you want to change the color, create a conditional saying that when custom state X is Y, change the background color property to the one you desire.
You can do the same thing with URL parameters as in the image below:
Another way to do it is by defining HEX colors in the database or in option sets, and when defining the element’s color, you use text as dynamic data color.
The first solution is simpler and will work for specific cases, while the second solution is more robust and works better for more scalable cases, such as the need for the user to define the application’s theme color.