High contrast mode
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1.1k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 690
Description
Current theme system handles light dark for a single theme. However many modern themes can be fairly low contrast by default which makes elements and boundaries difficult for users who need more contrast. We should respect user preferences and apply prefers-contrast in the output theme automatically.
* Because the system is aware of which colors are used as foreground vs background, we can automatically compute contrast values during theme generation given a map.
* during theme construction time we perform this computation and where contrast is not high enough we can apply a prefers-contrast preference check to adjust either foreground and/or background colors
* is it possible to apply this also to component override styles automatically? Perhaps by looking for background or color modifications or leveraging the new contrast-color function?
* We want to allow for manual overrides and a few knobs such as target contrast level, or directly setting specific colors for high contrast in light and dark
Contributor guide
Assessment
This issue has not been assessed yet.