I made an expression that changes the color when the icon is activated, but it doesn't work well.
What should I do?
Maybe you can use Transform-Map instead. For more complex logic, scripting is easier.
color is a vision expression for java color, not a css color for perspective.
https://docs.inductiveautomation.com/display/DOC81/color
You could use the css string "rgb(255,0,0)" instead. or just the hexstring (or hsl if you want to be special). some basic colors work with just a word too (like "red", "blue" "green")
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
Or the built-in color variables: --error, --neutral-90, etc.
The easiest way I know to get a list of those is to open the dev tools in your browser:
Or, obviously, your own color variables.