Help with a new widget for Habpanel

Hello friends. I am creating a new widget that allows me to control for each room:
-Temperature
-Humidity
-Setpoint
-Mode
-Battery
-Open window

I am trying to change the color of the text in which the temperature is displayed so that:
Current temperature> 24 -> red color
Current Temp <21-> blue color
Else -> white color

For this I am using this sentence, and it does not work.

<div class="row"> 
  <div class="col-xs-6"><span style="color: {{itemValue(config.temperatura_actual)>24?'red':itemValue(config.temperatura_actual)<21?'blue':'white'}}; font-size: 12pt">{{itemValue(config.temperatura_actual)}}</span></div>
  <div class="col-xs-6"><span style="font-size: 12pt">{{itemValue(config.humedad)}}</span></div>
</div>

Could you give me some hint of how I have to do it.
Thank you.

Those look quite cool. You gonna share when done? :wink:

It looks right. If you print that to screen, what do you get?

If you look at my train times widget in the galley, I do the same thing with delayed trains.

On phone so can’t look atm.

C