Skip to main content

Accessibility Color Contrast Checker

Check WCAG 2.1 contrast ratio between foreground and background colors. Instant pass/fail for AA and AAA standards, live text preview, and accessible color suggestions.

✓ WCAG 2.1 AA & AAA ✓ Live preview ✓ 5 accessible alternatives

Color Presets

Color Pair

Contrast Analysis

—
Contrast Ratio
AA Normal Text
—
Min 4.5:1
AA Large Text
—
Min 3:1
AAA Normal Text
—
Min 7:1
AAA Large Text
—
Min 4.5:1

Live Text Preview

Small text (12px) — The quick brown fox jumps over the lazy dog.
Body text (16px) — The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.
Large text (20px bold) — Sample heading
Display (30px)

Accessible Foreground Alternatives

5 closest colors to your foreground that pass WCAG AA normal text (4.5:1)

Frequently Asked Questions

What is WCAG and why does contrast matter?▼

WCAG (Web Content Accessibility Guidelines) is the international standard for web accessibility, published by the W3C. Color contrast requirements ensure that people with low vision or color blindness can read text on your website. WCAG 2.1 Level AA (the most commonly required standard) mandates at least 4.5:1 contrast for normal text and 3:1 for large text (18pt+ or 14pt bold).

What counts as 'large text' in WCAG?▼

Large text is defined as 18pt (24px) or larger for regular weight, or 14pt (approximately 18.67px) or larger for bold text. The contrast requirement for large text is lower (3:1 for AA, 4.5:1 for AAA) because larger text is easier to read even at lower contrast ratios.

What is the difference between WCAG AA and AAA?▼

AA is the minimum standard required by most accessibility laws (including the ADA, EN 301 549, and AODA). AA requires 4.5:1 for normal text and 3:1 for large text. AAA is the enhanced standard — it requires 7:1 for normal text and 4.5:1 for large text. Most projects target AA; AAA is recommended for critical content like medical or legal information.

How is the contrast ratio calculated?▼

The WCAG formula converts hex colors to relative luminance values using the sRGB color space. Each channel (R, G, B) is linearized, then luminance L = 0.2126R + 0.7152G + 0.0722B. The contrast ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter of the two luminances. This formula is standardized in WCAG 2.x and used by all major accessibility testing tools.

My design fails AA — what should I do?▼

Use this tool's alternative suggestions to find the closest passing shade. Common fixes: darken light text colors, lighten dark text on light backgrounds, or increase font size to meet the lower large-text threshold. Also consider using Tailwind's color scale steps — moving from gray-400 to gray-600 typically adds 2-3x contrast.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →