Closed seanomat closed 6 months ago
state-colors need to be defined as rgb-values, hex or names are no longer allowed.
Wrong, you may define your OWN variables as you like. Although HA dev decided to define new vars as "255,255,255" - you should not repeat same not wise decision and you may keep defining your OWN vars as you wish. "OWN" - means your unique vars with different names.
I am using my own vars but that doesn't change anything about what format the value of this variable has to have to be applied. When I define the color in HEX it will not be applied to the new states, and if I define it in RGB it will not be applied to the card-mod-styles.
When I define the color in HEX it will not be applied to the new states, and if I define it in RGB it will not be applied to the card-mod-styles.
This is a point - the new shiny Way is for internal use, not for dirty external custom plugins. Solution: use "---rgb" values for the newly added vars. And these vars will be used for conventional cards. For customizing cards by card-mod - do NOT use vars, dig into DOM to use CSS properties.
255,193,7
is not a valid CSS color.
rgb(255,193,7)
is
My Home Assistant version: 2022.12
My lovelace configuration method (GUI or yaml): yaml
What I am doing: apply state-depending color to icon. Since the recent changes to state-colors in HA 2022.12, state-colors need to be defined as rgb-values, hex or names are no longer allowed. When I try to apply a color in rgb-notation to an icon, the icon turns black. The default should be blue, but it turns black, so I guess the style is applied, but the color-format can not be interpreted. When I change the css-definition of the color to hex-notation, the color is apllied as expected. This would mean I have to define every color twice in different notations.
What I expected to happen: the color to be applied
What happened instead: color not being applied, turns black instead
Minimal steps to reproduce:
Error messages from the browser console: No errors, just not applied
By putting an X in the boxes ([]) below, I indicate that I:
[x] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
[x] Have made sure I am using the latest version of the plugin.
[x] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
[x] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.