Skip to main content

Harshal V. LADHE

WCAG Colour Contrast

Web Content Accessibility Guidelines contrast ratios, AA and AAA thresholds, and checking text colours against them.

Content tagged wcag

  • Tutorial:contrast-color(): Automatic Readable Text on Any Background

    Let CSS choose readable white or black text automatically.
    Use CSS contrast-color() to pick white or black text for any background colour: how the spec defines it, custom properties and brand colours, buttons and tags, pairing with light-dark(), mid-tone limits, and an @supports fallback.
    Published at:
    Categories:CSS
    Estimated reading time:10 min read