WCAG Contrast Checker
Enterprise-grade accessibility validator. Calculate contrast ratios, simulate color blindness, and auto-fix violations to comply with WCAG 2.1 AA/AAA standards.
Accessible Design is Good Design.
This text demonstrates the contrast between your selected foreground and background. Hyperlinks typically need distinction. Ensure that your content is readable by everyone, everywhere.
About
Accessibility is not an aesthetic choice; it is a functional imperative and a legal requirement under frameworks like the ADA and Section 508. This tool provides a rigorous algorithmic assessment of color pairs against the Web Content Accessibility Guidelines (WCAG) 2.1. It utilizes the relative luminance formula to determine the precise contrast ratio, ensuring text and interactive elements remain legible for users with varying visual capabilities.
Unlike basic checkers, this engine includes a Vision Simulator to model Protanopia, Deuteranopia, and Tritanopia, and an Auto-Remediation system that mathematically calculates the nearest compliant color values. Use this tool to mitigate legal risk, improve SEO by reducing bounce rates, and ensure universal usability across your digital infrastructure.
Formulas
The WCAG contrast ratio is derived from the relative luminance of the foreground and background colors. Luminance is calculated using linearized RGB values.
1. Calculate Relative Luminance (L):
Then apply the weighted sum for sRGB:
L = 0.2126R + 0.7152G + 0.0722B
2. Calculate Contrast Ratio (CR):
CR = L1 + 0.05L2 + 0.05
Where L1 is the luminance of the lighter color and L2 is the luminance of the darker color.
Reference Data
| Level | Component | Ratio | Requirement |
|---|---|---|---|
| AA | Normal Text | 4.5:1 | Minimum for standard body text (< 18pt). |
| AA | Large Text | 3.0:1 | Minimum for bold (≥ 14pt) or large (≥ 18pt). |
| AA | UI Components | 3.0:1 | Input borders, icons, and focus states. |
| AAA | Normal Text | 7.0:1 | Enhanced contrast for maximum readability. |
| AAA | Large Text | 4.5:1 | Enhanced contrast for headlines. |
| Incidental | Inactive/Decorative | None | Disabled inputs or purely decorative elements. |