Change icon color

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.

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")


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.

1 Like