openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
212 stars 232 forks source link

[BasicUI] Adjust user-defined colors to theme for better contrast #2521

Closed lolodomo closed 1 month ago

lolodomo commented 1 month ago

Closes #1780

Colors are those defined by user through the labelcolor, valuecolor and iconcolor parameters. The aim is to provide a good contrast n both themes. For example white in light theme just leads to something not visible. So black is used instead.

This behaviour is already implemented in the Android app with the same adjustments.

Colors adjusted in light theme: yellow, pink, white, lime, aqua, silver and gold. Colors adjusted in dark theme: maroon, purple, green, navy, blue, black and gold.

These color adjustments are controlled by a new Basic UI setting, enabled by default. By disabling it, no adjustment is performed and the old behaviour is restored.

Signed-off-by: Laurent Garnier lg.hc@free.fr

lolodomo commented 1 month ago

Setting disabled:

image

Setting enabled:

image

Setting disabled:

image

Setting enabled:

image

lolodomo commented 1 month ago

Thank you Kai for your reviews.