button-card
button-card copied to clipboard
Opacity and Background Color
I'm trying to get the background color of the selected menu item on the left side of the main HA interface to use in a label card but I can't figure it out. HA seems to use the following to color it.
background-color: var(--sidebar-selected-icon-color);
opacity: 0.12;
How can I set the opacity of just the background without changing the text as well? I believe I can use the rgba, but I don't think I can use that in conjunction with the variable.
Thanks in advance!
bueller?
You can do that in supported browser:
background-color: color-mix(in srgb, var(--sidebar-selected-icon-color) 50%, transparent)
(50% is the transparency here)