Contrast Ratio Checker - WCAG Compliance Tool

Check WCAG contrast ratios to ensure accessible color combinations.

Normal text preview (16px)
Large text preview (18px bold)
Contrast Ratio
21.00:1

WCAG 2.1 Compliance

Normal Text (under 18px)
AA: Pass (requires 4.5:1)
AAA: Pass (requires 7:1)
Large Text (18px+ or 14px+ bold)
AA: Pass (requires 3:1)
AAA: Pass (requires 4.5:1)
UI Components & Graphics
AA: Pass (requires 3:1)

About Contrast Ratios

WCAG 2.1 requires minimum contrast ratios to ensure text is readable for everyone, including people with visual impairments. AA is the minimum legal requirement for most websites, AAA is enhanced compliance.

Common Accessibility Schemes

Contrast Ratio Checker: Advanced WCAG 2.1 Color Accessibility & Compliance Tool

Creating accessible digital interfaces is not only a moral imperative but also a key factor in standard SEO rankings and legal compliance worldwide. The Contrast Ratio Checker provides a high-fidelity, client-side interface to calculate perceived relative luminance and evaluate colors against WCAG AA and AAA body text rules. Running entirely locally, it guarantees sub-millisecond reaction speeds and total privacy for your design drafts.

Formula
Contrast Ratio = \frac{L_{lighter} + 0.05}{L_{darker} + 0.05}

Where L represents the WCAG relative luminance coefficient, ranging from 0.0 (pure black) to 1.0 (pure white).

Expert Verified Calculation

This calculator utilizes standard mathematical formulas audited and verified by our team of A11Y & Web Design Standards Council to ensure mathematical precision and compliance.

Last Evaluated: May 2026

Understanding Color Luminance & Perceived Contrast

Human eyes do not perceive the brightness of red, green, and blue light equally. Green light appears significantly brighter than blue light. The WCAG contrast formula accounts for this by applying spectral weighting coefficients to the linearized sRGB channels. By dividing the total adjusted brightness of the lighter color by the darker color, we obtain a precise ratio representing the visual contrast.

The Importance of AA and AAA Accessibility Standards

Level AA is the standard legal baseline for most commercial and governmental websites, ensuring readers with moderate low vision can digest text comfortably. Level AAA represents the peak tier of enhanced compliance, expanding accessibility to individuals with severe visual impairments. Adhering to these ratios prevents eye strain, boosts user session retention, and improves search crawler accessibility.

Practical Examples

Evaluating standard Dark Slate on Off-White Canvas

Verify if a modern slate text color (#1e293b) is legible on an off-white background (#f8fafc).

  • 1.Luminance of Foreground slate (#1e293b): L1 ≈ 0.0212
  • 2.Luminance of Background off-white (#f8fafc): L2 ≈ 0.9555
  • 3.Calculate ratio: Contrast = (0.9555 + 0.05) / (0.0212 + 0.05) ≈ 14.12
  • 4.Compliance Verdict: Passes AA and AAA requirements for both normal and large text formats!

Aesthetic Accessibility Benefits

  • Real-Time Text Preview: Renders body copy and bold headers instantly in the chosen color scheme to preview real-world readability.
  • Swap & Clear Actions: Swap foreground and background colors with a single click to test dark mode alternatives rapidly.
  • Dynamic WCAG Indicators: Quick checkmark arrays outlining pass/fail verdicts across standard normal, large, and graphical components.
  • Preset Color Schemes: Instant templates loading common highly accessible palettes like Slate, Teal, and Dark Blue.

Frequently Asked Questions

What is a WCAG contrast ratio?

The Web Content Accessibility Guidelines (WCAG) define contrast ratio as the difference in relative luminance (brightness) between foreground text and background colors, ranging from 1:1 (no contrast) to 21:1 (maximum contrast).

What contrast ratio is required for WCAG AA compliance?

WCAG 2.1 Level AA compliance requires a minimum contrast ratio of 4.5:1 for normal body text (under 18px) and 3:1 for large text (18px+ or 14px+ bold) and active UI graphics.

What contrast ratio is required for WCAG AAA compliance?

WCAG 2.1 Level AAA compliance represents the gold standard of accessibility, requiring a minimum contrast ratio of 7:1 for normal body text and 4.5:1 for large text or bold headlines.

How is relative luminance calculated?

Relative luminance is the perceived brightness of a color. It is calculated by linearizing the sRGB channels (red, green, and blue) and weighting them according to human spectral sensitivity: L = 0.2126R + 0.7152G + 0.0722B.

Is this contrast calculator secure for internal designs?

Absolutely. Your hex inputs, design drafts, and color palettes are computed 100% client-side inside your own local browser sandbox. No parameters or files are ever sent to our servers.