-
Notifications
You must be signed in to change notification settings - Fork 23
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
Customizable Title Bar Content Color #11
Comments
This is an interesting idea that might be valuable as a standalone feature (not specific to WCO), since it would lead to better theming for all apps. 😊 A couple questions:
|
Glad you like it as well! Should I move this suggestion to a different thread?
Title Bar Content Color - DevTools Title Bar Content Color - DevTools Error
I came across a more applicable scenario where changing the content color would be more beneficial than my previous example, and I made a few demo screenshots of how that may be helpful there as well. They are based on the school grading site Infinite Campus. Title Bar Content Color - Default Title Bar Content Color - Themed Sorry if that was a little lengthy, I just thought I'd share that example as well, as I think being able to use a colored accent is more of an applicable use case for this proposal than just a gray one like I showed before. 🙂 *Edit: I put |
I was testing around with the current standalone web app header theme color option present in the Web App Manifest and the
<meta name="theme-color">
attribute, and I thought that it would be helpful if developers had the ability to change the color that is supplied to the window's title bar labels and window control buttons. Currently, the browser determines what the color for the content should be, and it applies a color that provides enough contrast to keep legibility between the theme color and the labels and window control buttons.I can see how this may be an issue if one were to apply a color for the labels/window control buttons that doesn't allow for enough contrast for readability, however a possible solution to counteract this would be to use the current implementation of finding a high contrasting color, only if the one supplied by the developer doesn't meet the 4.5:1 contrast ratio, which is what most HTML elements with text are supposed to have.
This will be a helpful addition alongside the Window Controls Overlay API because matching an installed web app's window labels and window control buttons' color to the web app's interface color scheme will further improve design fluidity between system controls and the app's user interface, something that the Window Controls API is trying to solve with providing the ability for developers to customize the title bar.
Demo screenshots of the proposed idea and the possible solution to the content color contrast issue have been attached below.
Current Implementation - Display Mode: Standalone
Current Implementation - Display Mode: Window Controls Overlay
Title bar content does not match the web app's color scheme.
Proposed Idea - Display Mode: Window Controls Overlay
Title bar content is in line with the web app's color scheme.
Example of a Contrast Issue
In instances like the image below, the browser would use a fallback color that allows for more legibility based on the supplied theme color, such as using the default
#ffffff
in this case, because#ffffff
would provide enough contrast between the title bar content and the web app's theme color.The text was updated successfully, but these errors were encountered: