-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
theming: Separate primary
and background
colors - fix the header menu colors
#42977
Conversation
primary
and background
colors - fix the header menu colors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Psalm found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
76f6d54
to
c0f68a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@susnux in which cases was the current state specifically a problem? :) I was even thinking we can phase out color-primary-element in favor of just color-primary – since for our default that is now unified to the darker blue.
I really like your point 1) for example so things are automatically generated
4) though seems to make stuff more complex, not sure we need the separation. But that's why I'm asking. :) cc @juliushaertl
Please keep our clients in mind that rely on these values and need a non-manipulated primary color, so they can do their own math using material design on Android and ... on iOS to generate colors matching their standards. |
I think it would be good to have this separation, especially for cases where people disable user background theming (like in corporate environments) and then want to have a static background image (+color). Icon inversion in the header menu needs to be based on the background color or image and not the primary element color so splitting that makes a lot of sense to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickvergessen @juliushaertl right, if you say it makes sense let’s go with it. :) I can’t judge the code though.
3a0aba8
to
656ce6d
Compare
1d0e4c6
to
3e9ac19
Compare
…m images Signed-off-by: Ferdinand Thiessen <[email protected]>
While the primary color is intended to highlight elements, it can not always be used as the background color. So now primary is independent from background a user set, the background color is, if not set directly, calculated as the mean color of the background image. That color is then used as a fallback if the background image could not be loaded and for calculating the color of the text used on the app menu and dashboard (they render directly on the background). Signed-off-by: Ferdinand Thiessen <[email protected]>
fix(UnifiedSearch): Adjust to new background color Signed-off-by: Ferdinand Thiessen <[email protected]>
…und in admin settings Signed-off-by: Ferdinand Thiessen <[email protected]>
…al background image Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
…ry colors Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
…ry colors Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
3e9ac19
to
651afb8
Compare
🎉🎉🎉🎉🎉🎉🎉🎉 |
Summary
This will fix one of the main issues we face with our theming: Currently primary color used to highlight elements is mixed and directly connected to the background color.
So the goal is to have two different colors:
primary
to highlight elements - meaning used as an accent colorbackground
to be used as background on the body or fallback if images failes to load, moreover this will be used to calculate the header menu text color.To make this possible this PR is sadly bigger then I hoped, it contains following changes:
Previously we had a primary color predefined for every shipped background image, but not for custom images so that users had to select a color manually. As preparation for the other steps I added a function to automatically calculate the mean color of the image so it can be used as the primary / background color.
While the primary color is intended to highlight elements, it can not always be used as the background color. So now primary is independent from background a user sets, the background color is, if not set directly, calculated as the mean color of the background image. That color is then used as a fallback if the background image could not be loaded and for calculating the color of the text used on the app menu and dashboard (they render directly on the background).
primary
TODO
background_color
toprimary_color
user valueChecklist