Hehe yeah. I’m trying to learn how to change these things that are nested. I found where it is but really don’t know how to apply it in card_mod.
</s> <s>"#view>hui-view>vertical-layout$#columns>div>hui-entities-card$#states>div>hui-toggle-entity-row$hui-generic-entity-row>ha-entity-toggle$ha-switch$div>div.mdc-switch__track"</s> <s> In there is an opacity value that is like 0.53 or something by default. Should be 1 if you want to apply no opacity.
So if you’re going to ‘reverse’ calculate the colors, you might end up with strange/invalid colors.
E.g.
I want the color rgb(103, 205, 103) , reverse calculating with opacity 0.53 gives me rgb(174,229,174) in the event of a completely white background. However, if the background is black ( rgb(0,0,0)) it would return the color rgb(329,431,329) which is invalid. Makes sense, because you can’t make a color darker than black and opacity can always make it lighter.
Conclusion: it is better to use your card mod, especially since Home Assistant supports light/dark themes that might result in strange colors.