hi all,
I was looking for a way to change the background color (opacity) of my mushroom card slider without success, Iām quite new to this (code in general, started HA a few weeks ago) and I need a little help with the next step.
First I found ārgb-disabled, this one works in the code below and gives me the option to change the color, but unfortunately not the opacity/transparency.
I used the āinspectā/ (DOM?) option for the first time to figure out what declaration I need to change and found it: ābgācolor-inactive. tried changing it in the DOM function of chrome and it does exactly what I want to achieve.
Until now I have been unsuccessful implementing it though. Using DOM I found ābgācolor-inactive was inherited from mushroom-slider,
so I tried:
style: |
mushroom-light-brightness-control {
--slider-color: rgb(255,166,87) !important;
--slider-bg-color: rgba(255,166,87, 0.8) !important;
--rgb-disabled: 255,166,87 !important;
}
mushroom-slider {
--bg-color-inactive: rgba(var(--rgb-disabled), 0.8) !important;
}
ha-card {
background: rgba(225,225,225,0);
border: rgba(225,225,225,0);
}
this did not work, so i used :host as the declaration is mentioned under :host within mushroom-slider, did not work either:
style: |
mushroom-light-brightness-control {
--slider-color: rgb(255,166,87) !important;
--slider-bg-color: rgba(255,166,87, 0.8) !important;
--rgb-disabled: 255,166,87 !important;
}
:host {
--bg-color-inactive: rgba(var(--rgb-disabled), 0.8) !important;
}
ha-card {
background: rgba(225,225,225,0);
border: rgba(225,225,225,0);
}
Tried it in the light-brightness-control, no luck:
style: |
mushroom-light-brightness-control {
--slider-color: rgb(255,166,87) !important;
--slider-bg-color: rgba(255,166,87, 0.8) !important;
--rgb-disabled: 255,166,87 !important;
--bg-color-inactive: rgba(var(--rgb-disabled), 0.8) !important;
}
ha-card {
background: rgba(225,225,225,0);
border: rgba(225,225,225,0);
}
Can anybody help me understand what Iām doing wrong? how I can implement the declarations I found using DOM?
Edit: Just had a brain-fart, should I be using card-mod because of the variable?
p.s. I donāt know when to use !important so at the moment I just put it everywhere.