-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix Color Contrast for Catppuccin Mocha card background #6896
base: development
Are you sure you want to change the base?
Conversation
Thanks for looking into this!
Unfortunately, this will not suffice because the minimum acceptable color contrast between a text color and its background color is 4.5:1 or 7:1 (depending on whether WCAG AA or AAA standard is being used). |
I hear you. However, there is a tradeoff between background contrast and text contrast. If we choose a lighter color, the text is less readable. A darker color means the current implementation's problem. If you have an idea as to which color offers a good contrast both versus the background and the text, I'm open to suggestions. Otherwise I don't see how to get one contrast without sacrificing the other. Examples:
|
That's unfortunately the case, and we should not sacrifice either if we can help it. One way we could do this is by having separate colors for the border around the name and the inner background text color. |
Yep, exactly that. |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Fix Color Contrast for Catppuccin Mocha card background
Pull Request Type
Related issue
closes #6597
Description
I wanted to improve the color contrast for the background around the video uploader's name on an uploader's comment. Strong color contrasts are important for accessibility.
This PR improves the color contrast from 1.07:1 to 3.59:1 (link to contrast checker) while still staying within the Catppuccin Mocha color palette ("Overlay 0").
I considered this color a decent middleground between background contrast and text contrast. The text vs. secondary-card-bg contrast is still a clearly differentiated 3.37:1.
Screenshots
Before:

After:

Testing
Desktop
Additional context
This satisfies the WCAG recommendation of at least 3:1.