WCAG 2.1 Accessibility

WCAG Color Contrast & Accessibility Checker

Test foreground and background color pairs against WCAG AA and AAA rules, preview real UI controls, and auto-fix low-contrast shades in one click.

AllOmnitools Editorial TeamNov 25, 2026Updated Nov 25, 20265 min readBeginner

Foreground & Background

rgb(15, 23, 42) • L=0.008
rgb(255, 255, 255) • L=1.000
--text-color: #0F172A; --bg-surface: #FFFFFF;
WCAG 2.1 Contrast Ratio
17.85:1
AAA Excellent
Normal Text AA (≥ 4.5:1) PASS
Normal Text AAA (≥ 7.0:1) PASS
Large Text 18pt+ AA (≥ 3.0:1) PASS
Large Text AAA (≥ 4.5:1) PASS
UI Icons & Borders AA (≥ 3.0:1) PASS
Live Typography & UI Component Preview

Body copy at 16px regular weight. Accessible contrast keeps forms, dashboards, and long-form articles effortless to read in bright sunlight and low-vision settings.

Outlined Action

Understanding WCAG 2.1 AA vs AAA Contrast Thresholds

UI ElementAA MinimumAAA EnhancedApplies To
Normal Text4.5 : 17.0 : 1Body text, labels & captions below 24px (or 18.66px bold)
Large Text3.0 : 14.5 : 1Headings ≥ 24px regular or ≥ 18.66px bold
UI Components3.0 : 1—Input borders, focus rings, icons & chart series (SC 1.4.11)

Preserving Brand Hue When Fixing Low-Contrast Text

Darkening a failing color by mixing black in RGB makes blues look slate-gray and oranges look brown. Our one-click Auto-Fix shifts lightness purely along the HSL channel so your brand hue stays recognizable while crossing 4.5:1 or 7.0:1 cleanly.

How to Use This Tool

  1. 1 Pick or paste your Foreground (text/icon) and Background hex colors, or click a preset pair.
  2. 2 Check the live WCAG 2.1 contrast ratio and the five AA/AAA pass/fail badges on the right.
  3. 3 If a pair falls short of 4.5:1 or 7.0:1, click Fix Text for AA or Fix for AAA to apply the nearest accessible shade.
  4. 4 Copy the generated CSS custom properties directly into your stylesheet.

FAQ

Normal body text requires at least 4.5:1 contrast, while large text (24px+ or 18.66px+ bold) and interactive UI borders/icons require at least 3.0:1.