All Calculators
๐ŸŽจ

Color Contrast Checker

Compare foreground and background colors against WCAG 2.1 contrast ratios for accessible design.

Colors

Contrast Results

Preview
Aa
Sample text contrast
โš–๏ธ
Contrast Ratio
โ€”
Ratio computed from relative luminance L1/L2
โœ”๏ธ
Large Text
โ€”
WCAG AA (โ‰ฅ3.0) / AAA (โ‰ฅ4.5)
โœ”๏ธ
Normal Text
โ€”
WCAG AA (โ‰ฅ4.5) / AAA (โ‰ฅ7.0)
Criterion
Minimum Ratio
Status
WCAG AA โ€“ Normal text
4.5 : 1
โ€”
WCAG AA โ€“ Large text
3.0 : 1
โ€”
WCAG AAA โ€“ Normal text
7.0 : 1
โ€”
WCAG AAA โ€“ Large text
4.5 : 1
โ€”
Non-text UI/graphics
3.0 : 1
โ€”

๐Ÿ“– How to Use

Pick foreground and background colors via picker or hex input. Review the contrast ratio and WCAG compliance across text sizes. Use presets to experiment with common palettes, and adjust colors until all required criteria pass.

๐Ÿงฎ Formula Reference

Relative luminance: L = 0.2126 ร— Rฮณ + 0.7152 ร— Gฮณ + 0.0722 ร— Bฮณ, where ฮณ = 2.4 for sRGB.
Contrast ratio: (L1 + 0.05) รท (L2 + 0.05), with L1 โ‰ฅ L2.
Thresholds: AA normal 4.5:1, AA large 3:1, AAA normal 7:1, AAA large 4.5:1.

๐Ÿ’ก Tips

  • Test contrast in both light and dark modes for consistent accessibility.
  • Large text refers to 18pt regular or 14pt bold equivalents.
  • Include keyboard focus states and disabled UI elements when evaluating palettes.
  • Re-run checks after adjusting opacity or overlay effects.

๐Ÿ”— References

  • W3C Web Content Accessibility Guidelines (WCAG) 2.1 โ€“ Contrast Success Criteria.
  • W3C Techniques for WCAG 2.1 โ€“ G17: Ensuring sufficient contrast of text.
  • W3C Understanding WCAG 2.1 โ€“ Non-text contrast guidance.