Widget Background Color multiple Item state

Good morning,
I have an item with multiple stati, and would like a different background color for each status.
for example:
Status1 = blue
Status2 = green
Status3 = red
How can I solve this? Does anyone have an idea or solution for me?

Greetings Oliver

Hello, that’s clear, but I have 3 states of the item.
How do I proceed if each state is to have a different color?

OK, i use this:
‘background-color’: itemValue(‘item’)==‘ON’ ? ‘color1’ : ‘color2’

and that works
regards Oliver

1 Like