Skip to main content
Frontend & CSS

WCAG Color Contrast Ratio Checker & Accessibility Validator

Client-Side Privacy

Calculate precise WCAG 2.1 AA and AAA contrast ratios between foreground text and background colors for accessible UI/UX design.

Sample Contrast Preview

The quick brown fox jumps over the lazy dog

6.8 : 1
AA PassAAA Fail
Input Source Content
Output Result

WCAG 2.1 Contrast Ratio Mathematics & Inclusive UX Design

The Web Content Accessibility Guidelines (WCAG) specify mathematical contrast ratios to ensure users with moderate visual impairments, low-contrast displays, or color vision deficiencies can comfortably read digital interfaces across light and dark themes without eye strain. Reliable contrast auditing protects both legal compliance and everyday usability across desktop monitors, OLED panels, and sunlit mobile screens.

+-----------------------------------------------------------------------------------+
|                        WCAG 2.1 RELATIVE LUMINANCE FORMULA                        |
+-----------------------------------------------------------------------------------+
|  Contrast Ratio = (L1 + 0.05) / (L2 + 0.05)                                       |
|     - L1 = Relative luminance of the lighter color (1.0 for pure white)           |
|     - L2 = Relative luminance of the darker color  (0.0 for pure black)           |
+-----------------------------------------------------------------------------------+
|  Compliance Thresholds:                                                           |
|     - Level AA (Normal Text < 18pt): Minimum 4.5:1 ratio                          |
|     - Level AA (Large Text >= 18pt or 14pt bold): Minimum 3.0:1 ratio             |
|     - Level AAA (Enhanced Normal Text): Minimum 7.0:1 ratio                       |
|     - Level AAA (Enhanced Large Text): Minimum 4.5:1 ratio                        |
+-----------------------------------------------------------------------------------+

SC 1.4.11 Non-Text UI Contrast

Accessibility does not stop at body copy. WCAG 2.1 Success Criterion 1.4.11 mandates at least a 3.0:1 ratio for functional UI boundaries: text input borders, toggle switch tracks, active icon states, chart data series, and keyboard :focus-visible rings against their adjacent card or canvas background colors. Never rely solely on hue changes to indicate errors, disabled buttons, or form validation states.

Gamma Linearization & Alpha Blending

Averaging raw sRGB hex channels produces broken ratios because human eyes perceive brightness non-linearly. Each normalized channel must pass through WCAG gamma expansion before applying the perceptual weights 0.2126R + 0.7152G + 0.0722B, and semi-transparent rgba() or opacity overlays must be alpha-composited onto their exact backdrop surface color before calculating final contrast.

Dark Mode Halation & APCA

Pure #FFFFFF text on #000000 creates harsh glare and astigmatic halation for many readers; modern design systems soften dark palettes to off-white (#E3E3E3) over charcoal (#131314) while preserving 10:1+ legibility. Emerging WCAG 3 APCA scoring also accounts for font weight, stroke width, ambient luminance, and light-on-dark polarity when validating thin display typography and small captions.

About WCAG Color Contrast & Palette Checker & Security Considerations

Everything you need to know about how this utility processes data safely in your browser.

What is the minimum WCAG AA contrast ratio?

WCAG AA requires a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text (18pt+ or bold 14pt+).

What is the WCAG AAA requirement?

WCAG AAA requires a strict 7:1 ratio for normal text and 4.5:1 for large text.

How does color contrast affect SEO and Google Lighthouse scores?

Google Lighthouse audits accessibility as a core quality score. Insufficient contrast ratios fail the Accessibility audit, depressing your overall score and harming search engine discoverability.

Are UI placeholder texts and disabled buttons subject to WCAG contrast requirements?

Inactive or disabled UI components and decorative elements are exempt from strict WCAG requirements. Form placeholder text, however, must provide sufficient contrast if it serves as the sole label for an input field.