-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improved Color Blind Support #12
Comments
Just pushed some pretty substantial updates! Improved color rendering has been implemented into Color ValuesThe system contains a handful of support colors (color palette):
Each of these colours have a During the alpha set generation, there's logic to determine readability based on light vs dark mode, and darkens/lightens the alpha colors accordingly. Check out the generator: All of these values get outputted as CSS values. (Phew...) Finally, at the component layer, these values can be implemented by using Something like this: const cx = [
styles.base,
styles.getBackground({ color, isBold }),
styles.getBackgroundText({ color, isBold }),
]; This allows for easy to use background/text color referencing, with seamless zero-config dark/light, color blind and contrast (pre configured) considerations out-of-the-box! |
Closing this up! Built-in color blind support for backgrounds has been streamlined - thanks to the new collection of presets within the Style System. |
Adding support for built-in improved color-blind support.
So far, it's available as unique background patterns for certain colors. This UI was inspired by how Trello handles color blind mode for their coloured tags:
https://wearecolorblind.com/examples/trello-colorblind-friendly-mode/
Getting this values is quite simple!
The mode can be enabled and toggled via the
<ThemeProvider />
cc'ing @diegohaz 😉
The text was updated successfully, but these errors were encountered: