lrose
June 29, 2022, 12:05pm
3
Your green color includes the #
, the grey color does not. Generally when a color is not recognized it will default to black.
These lines should be
self.parent.parent.getChild("FPS03").getChild("Icon").props.color = "#A5A5A5"
I would also strongly suggest using theme variables for your colors, as opposed to hard coding them. So if you ever decide to change them you will only need to change it in one place.
Some more on that here:
You really should look into using a custom theme and css variables for all of your standard colours, as it provides far better standardisation than any other method (or than simply using magic colours).
You can reference css variables and use them as component property values using:
var(--VARIABLE_NAME)
This is an example of my custom style variable.css below. Mostly I reference these within Perspective Styles, however I also do reference some of the directly in component property values when…
1 Like