Test the WCAG 2.1 & 2.2 luminance contrast ratio between any two HEX colors in real time. Paste your foreground and background HEX codes or drag the saturation and brightness sliders above to verify WCAG AA and WCAG AAA readability for body typography, headlines, UI components, brand palettes, and painterly focal points.
| Contrast Ratio | WCAG Level | Pass / Fail Criteria | Best Use Case |
|---|---|---|---|
| 1.0:1 – 2.99:1 | WCAG Fail | Fails all WCAG text & active UI thresholds | Decorative textures, subtle atmospheric gradients, disabled states |
| 3.0:1 – 4.49:1 | WCAG AA Large & UI | Passes Large Text (18pt+ / 14pt bold) & UI Icons (SC 1.4.11) | Display headlines, button borders, icons, data chart series |
| 4.5:1 – 6.99:1 | WCAG AA | Passes Normal Text (SC 1.4.3) & AAA Large Text | Standard web/app body copy, navigation links, form labels |
| 7.0:1 – 21.0:1 | WCAG AAA | Passes Enhanced Contrast (SC 1.4.6) for all text sizes | Long-form reading, small captions, low-vision accessibility, sharp focal accents |
The Web Content Accessibility Guidelines (WCAG) set minimum luminance ratios so people with low vision, aging eyesight, color vision deficiency, or sunlit mobile screens can read content effortlessly:
24px (18pt) regular or smaller than 18.66px (14pt) bold must reach at least 4.5:1 (or 7.0:1 for Level AAA under WCAG 1.4.6).24px+ regular weight or 18.66px+ bold weight require at least 3.0:1 for Level AA and 4.5:1 for Level AAA.
Unlike simple RGB brightness averages, WCAG linearizes each sRGB channel and weights them by human photopic eye sensitivity (L = 0.2126R + 0.7152G + 0.0722B), reflecting the fact that green light appears far brighter than pure blue. The contrast ratio is then computed as (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 is the darker color—spanning from 1.00:1 (identical colors) to 21.00:1 (pure black #000000 against pure white #FFFFFF).
WCAG AA requires 4.5:1 for normal text and 3.0:1 for large text and UI elements. WCAG AAA raises the requirement to 7.0:1 for normal text and 4.5:1 for large text.
WCAG defines large text as 18pt (24px) or larger at normal weight, or 14pt (18.66px) or larger when bold (font-weight: 700+).
Mathematically the WCAG luminance ratio stays identical in both directions, which is why the top panel previews Color 2 text on Color 1 and the bottom panel previews Color 1 text on Color 2 so you can judge optical halation as well.