I didn’t make that clear, to be fair - no worries!
This is fantastic - thanks very much!
For completeness, the entire widget is now (black font also required for amber colour!):
component: oh-label-item
config:
action: popup
actionModal: page:OutdoorTemps
icon: f7:thermometer
item: nOutdoorTemperature
title: Outdoor
style:
backgroundColor: '=items.MetOfficeWeatherWarning_Colour.state=="YELLOW" ?
"#FFFF00" : items.MetOfficeWeatherWarning_Colour.state=="AMBER" ?
"#FFBF00" : items.MetOfficeWeatherWarning_Colour.state=="RED" ?
"#FF0000":"#1c1c1d"'
color: '=items.MetOfficeWeatherWarning_Colour.state=="YELLOW" ? "black" :
items.MetOfficeWeatherWarning_Colour.state=="AMBER" ? "black" : "white"'
--f7-list-item-after-text-color: '=items.MetOfficeWeatherWarning_Colour.state=="YELLOW"
? "black" : items.MetOfficeWeatherWarning_Colour.state=="AMBER" ? "black"
: "white"'
which I use together with this setup to show active local weather warnings within the UI.