Is there any option of having different background color of a label depending on battery percentage?
I know can have different background colors with a ramp, but I cannot display a percentage value on top of that:
ramp-capacity-0-background = #75D18581
ramp-capacity-1-background = #75D48F81
...
ramp-capacity-0 = "%percentage%" ; no way :(
That's currently not supported, but it's a good idea to add it.
It would be actually great to have this for other values as well - cpu, memory, etc.
If anyone is still interested for this, I have been using this workaround:
[module/battery]
type = internal/battery
...
format-charging = <ramp-capacity> <label-charging>%{B-}
format-discharging = <ramp-capacity> <label-discharging>%{B-}
ramp-capacity-0 = %{B#e01212}
ramp-capacity-1 = %{B#e06912}
ramp-capacity-2 = %{B#e0b412}
ramp-capacity-3 = %{B#b7e012}
ramp-capacity-4 = %{B#3be012}
...

As you can see, it is possible to achieve the desired behavior by combining format-tags with ramps.
Closing in favor of #1752 and #2223
Most helpful comment
If anyone is still interested for this, I have been using this workaround:
As you can see, it is possible to achieve the desired behavior by combining format-tags with ramps.