|
Main /
ElementsAboutColorsColors in Ejs View Elements
A static color (i.e. a color that will not change during the execution of the simulation) for a given view element property is specified in Ejs using either one of the predefined Ejs colors:
or providing its integer RGB coordinates (between 0 and 255), plus an optional transparency coordinate, as in 0,253,12,255. Just type the desired value in the corresponding view element property. A specialized color chooser can also help you choose a given static color.
To specify a color that changes in run-time, you'll need to declare a variable of type Object, associate it to the corresponding element property, and then change the variable according to your program's logic.
For instance, if you declare a variable in Ejs called
If you need semi-transparent colors, use something like:
|