State Colour for a RGB light

On my HA dashboard, I added a card for the TV room ceiling light. The issue is that it’s difficult to distinguish between the on and off states just by looking at the brightness bar.

I could enable “State Colour” and set it to yellow, for example, but then the brightness bar remains yellow whenever the light is ON, even if the actual light colour is blue.

What I’m trying to achieve is this:
If the light colour is white, the state colour should appear yellow. Otherwise, the state colour should match the current colour of the light.

type: tile
entity: light.tv_room_light
icon: mdi:wall-sconce-flat
state_content: state
vertical: false
features:
  - type: light-brightness
features_position: inline

Screenshot 2026-02-19 at 12.28.40
Screenshot 2026-02-19 at 12.28.49

Change your theme.

The Tile Card does not support templating so you wont be able to do it directly.
There are custom cards that do allow templating and will be able to set color dependant on state.

Like for example the Mushroom Template Card

Or a bit more advanced the Card Mod
This one is very flexible, but will require some reading before using.

@Hellis81 what theme do you recommend?
@Dujith I tried Card Mod but neither me nor AI tools were able to fix the issue with Card Mod.

I use the normal theme but dark.
The theme you have is probably some kind of low contrast theme.

@Hellis81 You’re right, the problem doesn’t occur when I use a dark theme. However, in this particular case I prefer using a light theme.

By the way, I also tried the Mushroom card, and it has exactly the same issue.

It may seem like a simple issue at first, but it’s actually more complicated than it appears.

Not really, just find another theme that is light but with more contrast.
Or change this theme to get more contrast.
I would not change this on a card by card basis, that will probably make it look strange

You could just use a “Template Light Helper”

Specifically create a TLH that just copies all of the attributes of the real light:

  • On/Off
  • Brightness
  • HS Color
  • Initially I would exclude “Color Temperature” as that may cause issues.

Hence you would now have two lights that function the same (set either one and they would both update).

Then you can modify the TLH so that if the Saturation (of the HS Color) is 100% or close to 100% then change the reported/returned color to yellow.

You will likely have to play with it to ensure you don’t end up with yellow when trying to set white / maybe pick a specific shade of yellow which maps back to white. However something along those lines should work.