material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
364 stars 28 forks source link

High contrast #26

Closed JosefJezek closed 1 year ago

JosefJezek commented 2 years ago

Could you generate colors with high contrast for accessibility?

CSS has prefers-contrast media feature for the colors. https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast

The web needs the colors for light and dark theme.

You can add the colors to requested export https://github.com/material-foundation/material-theme-builder/issues/25

html.high-contrast {
}

html.dark.high-contrast {
}
rodydavis commented 2 years ago

Thanks for the feedback! Definitely want to support this feature but waiting on guidance for the values