Dynamic badge label (text) colours

Good application.
In my setup, I have chosen discrete scales like “cold - cool - warm - hot” (4 colors) with tunable intervals (“input_number” settings) for temperatures (similarly - for co2, pm25, tvoc, humidity, battery level, speedtest results, …).
But gradient colors look much nicer.

Unfortunately, we cannot use this “gradient function” as a macro available for all views/cards…

@parautenbach - added a link to your post to the consolidation post! Here all credits to you )))