Closed mueller-ma closed 5 months ago
It should be doable. I imagine to add an option to enable/disable this feature.
We update the colors in the app for over 5 years now and nobody complained about it. So I'm not sure if a setting is required here.
Like for the "Inline SVG" setting it's IMO yet another setting a user has to think about it and get a worse user experience when not enabling it. I can't think of a situation where a user wants text that is hard to read, for example.
Some users will prefer to get exactly the color they set in the sitemap I am one of these users.
But I am ok to have by default a color remapping depending on theme for high contrast. So the new option can be enabled by default.
I will implement that as soon as the local settings stuff is done.
@mueller-ma : you forgot to cover 2 colours in Android app: pink and gold ? Or do you consider these two colours are fine with bright and dark themes without the need to remap them ?
I added these two colors as "well-known" to the docs and Android app a few years ago: https://github.com/openhab/openhab-android/commit/e9bff16fc04f24d76c772e598de407d616c7f4e9
Which UI are you reporting an issue for?
The problem
Some colors are quite bright, so the contrast ratio between them and the white background is low and thus hard to read. Example with
labelcolor=["pink"]
:Your suggestion
This issue has been discussed and fixed in the Android app: https://github.com/openhab/openhab-android/issues/637
For the color names mentioned in the docs (https://www.openhab.org/docs/ui/sitemaps.html#label-and-value-colors) the app has a list with hexcodes for the light and for the dark theme to make sure a high contrast version is used: https://github.com/openhab/openhab-android/commit/68a0dc0c1d80ef5e17f8c97a09c9bb7ece49e421#diff-6e07de53fc6b88f960de082644106654b0ea82d22616dcfe3180a11f307d1625
The docs also mention this behavior: