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

Enhance Font Contrast for Saffron Color Card Based on Light/Dark Mode Preference #5941 #5970

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rajasurya-rjs
Copy link

Description

This PR addresses the low contrast issue with the "Saffron" color box by dynamically adjusting the font color based on the user's light or dark mode settings. The text color is now set to black for better readability when the "Saffron" background is used, regardless of the theme. The solution utilizes CSS media queries with prefers-color-scheme to ensure the appropriate font color is applied in both light and dark modes.

This PR fixes #5941
Screenshot 2024-10-03 at 9 56 46 PM

@l5io
Copy link
Contributor

l5io commented Oct 3, 2024

🚀 Preview for commit 2beff79 at: https://66fec9f605f377d417f5cf8a--layer5.netlify.app

@rajasurya-rjs
Copy link
Author

is there any thing which need to change ?

@vishalvivekm
Copy link
Member

@rajasurya-rjs Thank you for your contribution!
Let's discuss this during the website call on Monday at 5:30 PM IST (7:00 AM CT).

Please add it as an agenda item to the meeting minutes.

@l5io
Copy link
Contributor

l5io commented Oct 8, 2024

🚀 Preview for commit 7fca3df at: https://6704e762bad915e0d9073900--layer5.netlify.app

@rajasurya-rjs
Copy link
Author

is there any thing whether i need to add?

@@ -88,7 +88,9 @@ const Layer5Brand = () => {
<Row className="color-code-wrapper">
<ColorBox name="Keppel" R="0" G="179" B="159" colorCode="#00B39F" />
<ColorBox name="Caribbean Green" R="0" G="211" B="169" colorCode="#00D3A9" />
<ColorBox name="Saffron" R="235" G="192" B="23" colorCode="#EBC017" />
<div className="blond-color-box">
Copy link
Member

Choose a reason for hiding this comment

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

why are we using the class of next color box ?

@vishalvivekm
Copy link
Member

@rajasurya-rjs please take a look the ask in the issue's description:

Note

Enhance the font color used to be a theme-based reference based on the visitor's current light or dark mode settings.

currently, the text has same color in both the modes:

Screenshot from 2024-10-14 13-23-19
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Brand] White text on Saffron color card is difficult to read
4 participants