Changing color of OH-Cell based on temperature of an item

I am trying to make the color of an oh-label-cell change based of the temperature value of an item.
I have two items; A target temperature and the current temperature. I tried something like below, but it didn’t work. Could the problem we related to the unit of the item (°C)?

color: ‘=(items.CurrentTemperature.state < items.TargetTemperature.state) ? “green” : “red”’

Also tried this without any color showing.

=(items.ESPHome_Wavin_Channel_08_Current_temperature.state >= 27 | °C) ? “green” : “red”

=(Number.parseInt(items.CurrentTemperature.state) < Number.parseInt(items.TargetTemperature.state))?"green":"red"

Still not working. Can you see what I am doing wrong?

color: ‘=(Number.parseInt(items.ESPHome_Wavin_Channel_08_Current_temperature.state)
> 20) ? “green” : “red”’

Testing with a single item as a beginning…

Just to check: with oh-label-card the parameter to change is background. Have you confirmed that you can change the colour of the cell at all?

For oh-label-cellthe color parameter is described as

Color to use when highlighted

The documentation then has an on parameter which affects this highlighting, which might be worth checking?

I can say that

=(Number.parseInt(items.ESPHome_Wavin_Channel_08_Current_temperature.state) > 14) ? ‘red’:‘green’

has the right syntax as I just tried this out on my system.

I would recommend to open the developer side bar to try out the expression:

Developer Sidebar
(Shift+Alt+D)

Also check if the color you want to apply (in this case red / green) would work on the widget. Some of the color entries of widgets don’t accept color names.