Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Apr 7, 2024

Conversation

lolodomo
Copy link
Contributor

@lolodomo lolodomo commented Apr 5, 2024

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 lolodomo added enhancement New feature or request basic ui Basic UI labels Apr 5, 2024
@lolodomo lolodomo requested a review from a team as a code owner April 5, 2024 18:45
@lolodomo
Copy link
Contributor Author

lolodomo commented Apr 5, 2024

Setting disabled:

image

Setting enabled:

image

Setting disabled:

image

Setting enabled:

image

Closes openhab#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>
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kaikreuzer kaikreuzer merged commit aaf3edc into openhab:main Apr 7, 2024
3 checks passed
@kaikreuzer kaikreuzer added this to the 4.2 milestone Apr 7, 2024
@lolodomo
Copy link
Contributor Author

lolodomo commented Apr 7, 2024

Thank you Kai for your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basic ui Basic UI enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some label/value colors have a low contrast ratio
2 participants