Home
ToolsAA
• Zero Data Transmission
WCAG 2.1 & 2.2 Standard Engine

WCAG 2.1 & APCA Color Contrast Checker (AA & AAA Validator)

Evaluate foreground and background color combinations against WCAG 2.1 Level AA and AAA standards and modern APCA readability metrics with live text sample simulation.

Curated Contrast Presets:
19.02:1
AAA Enhanced Pass
RGB(248, 250, 252)
Quick Tweaks:
RGB(9, 9, 11)
Quick Tweaks:
Real-Time Contrast Score
19.02: 1
AAA Enhanced Pass

Optimal accessibility. Fully compliant for all body text, headings, and interface elements.

1:13.0 (Large AA)4.5 (Normal AA)7.0 (AAA)21:1

Normal Body Text (< 18pt / 24px)

Body Copy
Level AA (Min 4.5:1)PASS
Level AAA (Min 7.0:1)PASS

Large Text (≥ 18pt or 14pt bold)

Headlines
Level AA (Min 3.0:1)PASS
Level AAA (Min 4.5:1)PASS

UI Components & Graphical Objects (WCAG 1.4.11)

Buttons, Borders, Icons
Level AA (Min 3.0:1)

Required for active user interface components, input focus borders, and icons.

PASS

Live Accessibility Preview & Vision Simulator

Inspect how your color pair renders across real-world typography, interactive components, and color vision deficiencies.

Live Render • 19.02:1
Display Headline (28px Bold)

Accessible design creates inclusive experiences for everyone.

Body Copy (16px Regular)

The quick brown fox jumps over the lazy dog.

Small Subtext / Footnote (13px Muted)

WCAG 2.1 requires a minimum contrast of 4.5:1 for normal text and 3.0:1 for large text. AAA compliance requires 7:1 for enhanced visual clarity in high-glare environments.

Edit Preview Text:
0/2000

100% Private Browser Execution

All data processing, parsing, and compilation execute strictly inside your local browser memory. Zero external server uploads.

Instant Live Preview

Instant real-time reactive computation delivers immediate feedback on every keystroke with zero network latency.

Production Standards & Compliance

Outputs clean, cross-browser CSS and visual values verified against modern web layout standards.

Formula & Reference Guide

WCAG 2.1 & APCA Color Contrast Accessibility Guide

Evaluate foreground and background color contrast against WCAG 2.1 AA/AAA and APCA readability standards, relative luminance math, and accessible fixes.

WCAG 2.1 & APCA Color Contrast Accessibility Guide — Client-Side Calculation Flow & Methodology
WCAG 2.1 & APCA Color Contrast Accessibility Guide — Client-Side Calculation Flow & Methodology
W3C WCAG Conformance

WCAG 2.1 / 2.2 Accessibility Color Contrast Thresholds Table

Official Web Content Accessibility Guidelines (WCAG 2.1 / 2.2) minimum color contrast ratio thresholds across Conformance Levels AA and AAA for text, large text, and graphical components.

WCAG 2.1 / 2.2 Accessibility Color Contrast Thresholds Table
Conformance LevelUI Element TypeFont Size & Weight RequirementMinimum Required RatioLegal & Design Compliance Standard
WCAG AARegular Body Text< 18pt (24px) regular or < 14pt (18.66px) bold4.5 : 1Mandatory global minimum for commercial and enterprise web
WCAG AALarge Text & Headings≥ 18pt (24px) regular or ≥ 14pt (18.66px) bold3.0 : 1Mandatory minimum for large headlines and lead typography
WCAG AAUI Components & IconsInput borders, checkbox icons, infographic boundaries3.0 : 1Required for essential non-text interactive visual boundaries
WCAG AAAEnhanced Body Text< 18pt (24px) regular text7.0 : 1Enhanced contrast standard for government and high-accessibility portals
WCAG AAAEnhanced Large Text≥ 18pt (24px) regular or ≥ 14pt (18.66px) bold4.5 : 1Enhanced contrast for headings in accessible design systems
W3C Web Content Accessibility Guidelines (WCAG) 2.2 Success Criterion 1.4.3 & 1.4.6.

Key Parameters & Controls

Key Parameters & Controls
ParameterType / UnitDescriptionDefault
Relative Luminance (L)Normalized sRGB float (0.000 to 1.000)The relative brightness of any point in a colorspace, normalized to 0.0 for darkest black (#000000) and 1.0 for lightest white (#FFFFFF) via IEC 61966-2-1 sRGB gamma expansion (C_linear = C <= 0.04045 ? C/12.92 : ((C+0.055)/1.055)^2.4) and ITU-R BT.709 photometric coefficients (L = 0.2126*R + 0.7152*G + 0.0722*B).L1 = 1.000, L2 = 0.038
Contrast Ratio (CR)Photometric ratio (1.00:1 to 21.00:1)Calculated as (L1 + 0.05) / (L2 + 0.05) where L1 is the lighter color luminance and L2 is the darker color luminance. The constant 0.05 represents standard ambient room light reflection on screen glass.4.50:1
WCAG AA Compliance ThresholdMandatory legal benchmarkRequires a minimum ratio of 4.5:1 for standard body text (< 18pt regular or < 14pt bold) and 3.0:1 for large typography (>= 18pt / 24px or >= 14pt / 18.66px bold) and user interface graphical components.4.5:1 (Normal) / 3.0:1 (Large)
WCAG AAA Compliance ThresholdEnhanced accessibility benchmarkRequires an enhanced ratio of 7.0:1 for standard body copy and 4.5:1 for large typography, ensuring legibility for individuals with severe visual impairments or under adverse screen glare.7.0:1 (Normal) / 4.5:1 (Large)

Pro Tips & Best Practices

The 0.05 Ambient Flare Constant and Subpixel Anti-Aliasing

The W3C contrast equation adds +0.05 to both luminance values to model ambient room reflection off screen glass. Because operating systems apply subpixel font smoothing (ClearType or CoreText), ultra-thin font weights (100-300) lose optical density; a color pair passing 4.5:1 mathematically will fail perceptual readability unless rendered at font-weight 400 or higher.

Semi-Transparent Alpha Channels Cannot Guarantee Conformance

Using CSS rgba() or hex alpha values creates dynamic contrast that shifts across varying background layers. WCAG 2.1 requires contrast evaluation against the worst-case composited pixel. Always blend alpha channels over the solid container backdrop using alpha compositing (C_out = C_fg * alpha + C_bg * (1 - alpha)) before certifying compliance.

APCA vs WCAG 2.1 Polarity Discrepancy

WCAG 2.1 treats contrast symmetrically (black on white has the same 21:1 score as white on black). However, the human visual system perceives dark text on light backgrounds (positive polarity) with significantly higher acuity due to pupil constriction and reduced halation. APCA assigns asymmetric Lc scores, meaning an identical color pair may pass in light mode but require higher lightness differential in dark mode.

Common Gotchas & Troubleshooting

⚠️My brand primary color scores 4.1:1 on white background, failing WCAG AA normal text by a narrow margin.

Instead of redesigning the entire brand identity, reserve the 4.1:1 color for large headers (>= 24px or >= 18.66px bold) or interactive UI container fills where the 3.0:1 threshold applies. For 16px body copy, use the tool's Auto-Fixer to darken the color to approximately 4.54:1 by reducing HSL lightness while retaining original hue and chroma.

⚠️Hover or disabled button states become invisible or fail accessibility audits.

Under WCAG 2.1 Success Criterion 1.4.11 (Non-text Contrast), active interactive boundaries must maintain at least 3.0:1 contrast against adjacent background colors. While purely inactive disabled elements are technically exempt from 1.4.11, accessible UX best practice requires pairing low-contrast disabled states with aria-disabled='true' and visible tooltips rather than dropping contrast below 2.5:1.

Frequently Asked Questions

How is the WCAG color contrast ratio calculated?▼

The WCAG 2.1 contrast ratio is calculated using the formula (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color. Luminance is derived by converting 8-bit sRGB color channels (0 to 255) to linear light values: if C / 255 <= 0.04045, linear C = (C / 255) / 12.92; otherwise, linear C = (((C / 255) + 0.055) / 1.055)^2.4. These are weighted as L = 0.2126*R + 0.7152*G + 0.0722*B. The resulting ratio ranges between 1:1 (identical colors) and 21:1 (pure black #000000 on pure white #FFFFFF).

What is the difference between WCAG AA and AAA contrast requirements?▼

WCAG Level AA is the legal standard referenced by Section 508, ADA Title III, and EU EN 301 549, requiring a minimum 4.5:1 contrast ratio for normal text (under 18pt / 24px regular, or under 14pt / 18.66px bold) and 3.0:1 for large text and essential UI components. WCAG Level AAA is the enhanced tier targeting severe low-vision conditions, demanding 7.0:1 for normal text and 4.5:1 for large text. Most enterprise design systems mandate AA compliance globally and reserve AAA for mission-critical legibility such as legal disclaimers, medical apps, and government public notices.

What font size qualifies as large text under WCAG?▼

Under WCAG 2.1 guidelines, 'large text' is explicitly defined as at least 18 point (typically 24 CSS pixels at standard 96 DPI resolution) or at least 14 point bold (typically 18.66 CSS pixels with font-weight 700 or bolder). Large text only requires a 3.0:1 contrast ratio for Level AA compliance and 4.5:1 for Level AAA compliance, because larger glyph strokes provide greater optical surface area on the human retina.

Why do placeholder text and inactive disabled buttons frequently fail contrast checks?▼

Standard browser default placeholder text (such as #767676 on white) frequently hovers around 4.5:1, but many styling libraries reduce opacity to 0.4 or 0.5, plummeting contrast down to ~2.2:1. While WCAG 1.4.3 specifically exempts inactive user interface components (such as disabled buttons) from mandatory contrast ratios, form placeholder inputs are NOT exempt if they contain essential instructional guidance. Replacing ephemeral placeholder text with persistent floating labels ensures 4.5:1 compliance without relying on low-contrast inputs.

What is the difference between WCAG 2.1 and APCA WCAG 3.0 contrast scoring?▼

WCAG 2.1 uses a static mathematical ratio (1:1 to 21:1) based purely on relative luminance, failing to account for spatial frequency (font weight and stroke thickness) or polarity (light-on-dark versus dark-on-light). APCA (Accessible Perceptual Contrast Algorithm), developed for future WCAG 3.0, calculates a signed Lightness Contrast value (Lc 0 to 108+) based on human photoreceptor response and cortical processing. Under APCA, thin fonts require much higher Lc values than bold fonts, and dark mode requires higher luminance differences to match light-mode legibility.