openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
213 stars 233 forks source link

BasicUI sitemap elements with valuecolor=["white"] are wrongly rendered in black #2570

Closed andrewfg closed 3 weeks ago

andrewfg commented 3 weeks ago

In BasicUI Sitemap if an element has the valuecolor=["white"] attribute it is wrongly rendered in black.

By contrast the valuecolor=["#ffffff"] and valuecolor=["red"] do work fully as expected.

Frame label="Living Room Media System" {
    // "#ffffff" => OK
    Switch item=AV_System_Scene_Control label="" icon="24gswitch" mappings=[PowerOff="Off", Music="Music", Bluray="Bluray", Tv="Tv"] valuecolor=["#ffffff"]
    // "white" => NOT OK!!
    Switch item=AV_System_Scene_Control label="" icon="24gswitch" mappings=[PowerOff="Off", Music="Music", Bluray="Bluray", Tv="Tv"] valuecolor=["white"]
    // "red" => OK
    Switch item=AV_System_Scene_Control label="" icon="24gswitch" mappings=[PowerOff="Off", Music="Music", Bluray="Bluray", Tv="Tv"] valuecolor=["red"]
}
lolodomo commented 3 weeks ago

This is due to the enhancement #2521. You can disable this behaviour, there is a new option for that. image

PS: I was sure there will be users that don't like this behaviour and I added an option for that.