Design

Design

#accessibility #contrast #CSS
color-contrast()
color-contrast()
Before color-contrast(), stylesheet authors needed to know accessible colors ahead of time. Often a palette would show black or white text on a color swatch, to indicate to a user of the color system which text color would be needed to properly contrast with that swatch.
·web.dev·
color-contrast()