WCAG Color Contrast Checker: APCA, Luminance Ratios & 2.1 AA/AAA Compliance
Calculate relative luminance and color contrast ratios to ensure web interfaces, typography, and interactive controls meet international accessibility standards.
Mathematical Foundations: Relative Luminance (WCAG 2.1)
The Web Content Accessibility Guidelines (WCAG) compute contrast ratio between two colors via relative luminance ($L$):
Ratio = (L1 + 0.05) / (L2 + 0.05), where $L1$ is the lighter color and $L2$ is the darker color.
Relative luminance is calculated by converting sRGB channels (0–255) to linear color space via gamma expansion, then computing perceptual weight: L = 0.2126 × R + 0.7152 × G + 0.0722 × B.
Compliance Thresholds (AA vs. AAA)
Meeting legal accessibility standards (Section 508, European EN 301 549, ADA) requires meeting specific thresholds:
- WCAG AA (Normal Text): Minimum contrast ratio of 4.5:1 for text smaller than 18pt (or 14pt bold).
- WCAG AA (Large Text): Minimum contrast ratio of 3.0:1 for text 18pt or larger, or 14pt bold.
- WCAG AA (UI Components & Icons): Minimum contrast ratio of 3.0:1 for form borders, buttons, and state indicators.
- WCAG AAA (Enhanced): Minimum contrast ratio of 7.0:1 for normal text, and 4.5:1 for large text.
Pro Tip: Practical Application
Because human eyes are vastly more sensitive to green wavelengths ($71.5%$) than blue ($7.2%$), blue text requires significantly lighter backgrounds to pass WCAG AA contrast tests.