Color Contrast Checker

Compute WCAG contrast ratio & pass/fail.

Check

Aa
 

Sponsored

How it works

How it works

The WCAG 2.1 contrast ratio is computed from relative luminance in linear sRGB.

  • Gamma expand sRGB to linear: L = (c<=0.03928 ? c/12.92 : ((c+0.055)/1.055)^2.4).
  • Relative luminance: 0.2126 R + 0.7152 G + 0.0722 B.
  • Contrast ratio: (L1+0.05)/(L2+0.05) with L1 ≥ L2.

Thresholds: AA 4.5 (normal text), 3.0 (large); AAA 7.0 (normal), 4.5 (large).

Privacy & Security

All calculations local.

Accuracy, Limits & Tips

Only hex input; no alpha channel.

Examples

  • #000000 on #FFFFFF has 21:1 contrast.

Looking for broader guides and best practices? Visit the ToolsAreUs Blog for indexes (like the full tool list) and articles (e.g. secure password generation).