-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix(theming): Adjust theming util to calculate primary element color based on WCAG color contrast #42285
Conversation
/backport to stable28 |
9691b35
to
3441852
Compare
3441852
to
aededaf
Compare
…contrast and luma calculation) Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
… high contrast themes Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
aededaf
to
84123b3
Compare
Had to skip the test if the base class was run as a test case on its own as - of cause - the |
Yes and no. |
Summary
This adjusts the theming utils for calculating the primary color:
invertTextColor
by not simply checking the luma channel of the HSL color but the real color contrastAlso keep blurry background and hover states in mind while calculating the element color.
Moreover I added a unit test for accessible colors.
Screenshots
Only the hover state has changed:
Checklist