Demystifying WCAG 2.2 Color Contrast Compliance
Web Content Accessibility Guidelines (WCAG 2.2) require adequate visual contrast between text and its background to ensure content is legible for people with visual impairments, color blindness, or users browsing in high-glare environments.
How to Use in 3 Quick Steps
- Set Text & Background Colors: Type your 6-digit HEX values into the foreground and background fields, or use the color pickers to test combinations.
- Inspect Live Compliance Scores: Instantly view the computed mathematical contrast ratio alongside clear Pass/Fail badges for WCAG Level AA and Level AAA standards.
- Swap or Adjust Tones: Use the 1-click "Swap" button to reverse foreground and background, or tweak lightness to turn a failing color combination into an accessible design system token.
WCAG 2.2 Compliance Threshold Quick Reference
| Standard / Level | Element Type | Minimum Ratio | Application Context |
|---|---|---|---|
| WCAG Level AA | Normal Body Text (< 18pt / 24px) | 4.5:1 | Paragraphs, form labels, tooltips, navigation links |
| WCAG Level AA | Large Text (≥ 18pt or ≥ 14pt bold) | 3.0:1 | Headings, hero banners, large prominent buttons |
| WCAG Level AAA | Normal Body Text (< 18pt / 24px) | 7.0:1 | High-accessibility legal portals, government sites |
| WCAG Level AAA | Large Text (≥ 18pt or ≥ 14pt bold) | 4.5:1 | Large text on specialized accessible platforms |
Understanding Relative Luminance Math
Contrast ratio is calculated by comparing relative luminance values (L1 and L2) using the sRGB linearization formula: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 is the darker color. Pure black on pure white achieves the maximum possible ratio of 21.00:1, whereas identical colors produce a minimum ratio of 1.00:1.
Frequently Asked Questions
Do non-text UI elements like borders and icons need to meet contrast ratios?
Yes. WCAG 2.1/2.2 Success Criterion 1.4.11 (Non-text Contrast) mandates that active user interface components (such as input borders, focus indicators, and standalone glyphs) must maintain at least a 3.0:1 contrast ratio against adjacent colors.
Are inactive or disabled buttons required to pass?
Under WCAG guidelines, text or components that are purely decorative or currently inactive (disabled states) are exempt from contrast requirements, though maintaining readability remains a UX best practice.
Need a cohesive palette before checking contrast?
Use our Color Palette Generator to explore harmonious monochromatic, complementary, or analogous color schemes.

