U
UITLY
WCAG Color Contrast Checker

Free WCAG Color Contrast Checker AA & AAA Compliance

Check whether your foreground and background colors meet WCAG 2.1 accessibility standards. Get an instant contrast ratio, pass/fail results for AA and AAA levels, a live text preview, and an auto-generated accessible color suggestion — all in your browser.

Instant Ratio Score

See your exact WCAG contrast ratio the moment you pick your colors, with clear pass/fail badges

Live Text Preview

See exactly how your colors look on real UI elements — body text, headings, buttons, and badges

Auto Color Fix

When colors fail, the tool automatically suggests the nearest accessible alternative and lets you apply it instantly

Check Your Color Contrast Ratio

Pick your foreground and background colors, then instantly see whether they meet WCAG AA (4.5:1) or AAA (7:1) requirements for normal text, large text, and UI components.

WCAG Color Contrast Checker

Contrast Ratio

11.50:1

Passes WCAG AAA — Excellent!

AA Normal AAA Normal AA Large AAA Large AA UI
Use CaseRequired RatioAAAAA
Normal text (under 18pt)4.5:1Pass ✓Pass ✓
Large text (18pt+ or 14pt bold)3:1Pass ✓Pass ✓
UI components & icons3:1Pass ✓

Text Preview

The quick brown fox

Normal body text at 16px. This sentence demonstrates how readable your color combination is for everyday content.

Small text at 14px — used for captions, footnotes, and labels. Harder to read at low contrast.

Badge

Try Example Pairs

What This Checker Covers

WCAG 2.1 Compliance

  • AA level: 4.5:1 for normal text
  • AAA level: 7:1 for enhanced accessibility
  • 3:1 for UI components and large text

Real-World Preview

  • Headings, body text, and small text
  • Buttons, outlines, and badges
  • Inverted color toggle for dark mode

Smart Suggestions

  • Auto-generated compliant alternative color
  • One-click apply or copy hex value
  • Stays as close as possible to your original

No account required — 100% free, runs in your browser

The Complete Guide to Color Contrast & Web Accessibility

Poor color contrast is the single most common accessibility failure on the web. WebAIM's annual Million report consistently finds that over 80% of home pages have detectable contrast failures — meaning millions of users with low vision, color blindness, or age-related vision decline struggle to read everyday web content. This tool eliminates that problem before your code ships. You pick your colors, the checker does the WCAG math, and you walk away with a compliant palette in under a minute.

What Is Color Contrast in Web Design?

Color contrast describes the difference in perceived luminance between two colors — typically the foreground (text or icon) and the background it sits on. The human eye perceives luminance logarithmically, not linearly, so the difference between very dark and very light colors is not simply a matter of subtracting hex values. WCAG uses a specific formula based on relative luminance to produce a contrast ratio that correlates with real-world readability across a wide range of vision conditions.

The relative luminance formula applies a gamma correction curve to each RGB channel (converting the sRGB value to linear light), then combines the channels with weights that reflect the eye's sensitivity to different colors — green contributes 71.52%, red 21.26%, blue just 7.22%. Two colors with the same luminance value produce a ratio of 1:1 (no contrast). Pure black on pure white produces the maximum ratio of 21:1.

WCAG 2.1 Explained: What the Guidelines Actually Require

The Web Content Accessibility Guidelines (WCAG) are published by the W3C and define the international standard for accessible web content. WCAG 2.1 — the current widely-adopted version — organizes requirements into three conformance levels: A, AA, and AAA. Color contrast requirements live in Success Criterion 1.4.3 (Contrast — Minimum) for AA and 1.4.6 (Contrast — Enhanced) for AAA.

⚠️ Level A

Minimum accessibility. No color contrast requirement at this level — only that color is not used as the sole means of conveying information.

Level AA

The legal and industry standard. Required by ADA, Section 508, EN 301 549, and most government accessibility laws worldwide. Normal text: 4.5:1. Large text: 3:1.

🏆 Level AAA

Enhanced accessibility. Recommended for healthcare, government, and financial services. Normal text: 7:1. Large text: 4.5:1. Not required for entire sites.

AA vs. AAA: Which Level Should You Target?

Most teams target WCAG AA as their baseline — it satisfies legal requirements in the US (ADA), UK (Equality Act), EU (EN 301 549), and most other jurisdictions. AA compliance means normal text achieves a 4.5:1 contrast ratio and large text (18pt or 14pt bold) achieves 3:1.

AAA is the gold standard and the right target for interfaces where maximum readability is critical — healthcare portals, government services, financial applications, and educational platforms. At 7:1, AAA text is readable by users with 20/80 vision (moderate low vision) without additional aids. Not every color combination can achieve AAA while maintaining brand character, which is why WCAG explicitly states that AAA conformance is not required for entire sites.

Target AA if you're building:

  • SaaS products and web applications
  • E-commerce and marketing sites
  • Blogs, news sites, and content platforms
  • Mobile apps with web views
  • Any publicly accessible website

Target AAA if you're building:

  • Healthcare patient portals
  • Government and civic services
  • Financial and banking interfaces
  • Education and e-learning platforms
  • Assistive technology interfaces

How the Contrast Checker Works

This tool implements the WCAG 2.1 contrast ratio algorithm defined in Success Criterion 1.4.3 using pure JavaScript in your browser. Here is exactly what the calculation does:

  • 1Parse hex to RGB — The hex color values are split into R, G, B channels (0–255 each).
  • 2Apply gamma correction — Each channel is normalized (divided by 255) and linearized using the sRGB transfer function: values below 0.03928 divide by 12.92; others use ((val + 0.055) / 1.055) ^ 2.4.
  • 3Calculate relative luminanceL = 0.2126R + 0.7152G + 0.0722B using the linearized channel values.
  • 4Compute contrast ratio(L_lighter + 0.05) / (L_darker + 0.05) where the lighter luminance is always the numerator.
  • 5Evaluate WCAG thresholds — The ratio compares against 3:1, 4.5:1, and 7:1 to determine AA large, AA normal, and AAA compliance.

The color suggestion feature walks the failing foreground color toward white or black in small RGB increments, re-running the contrast calculation at each step until it finds the nearest color that achieves a 4.5:1 ratio. This ensures the suggested color stays as close as possible to your original while achieving compliance.

Real Design Examples: Pass vs. Fail

Understanding contrast failures in the abstract is one thing. Seeing them on real interface patterns is another. Here are the most common contrast problems design teams encounter in production:

Gray placeholder text

#9ca3af on #ffffff = 2.9:1 — FAILS AA

Use #6b7280 or darker for placeholder text. Many designers use the lightest gray they can find for placeholder styling, but anything below 4.5:1 is inaccessible.

Light blue on white

#60a5fa on #ffffff = 3.0:1 — FAILS AA normal text

Tailwind's blue-400 fails for body text on white. Switch to blue-700 (#1d4ed8, 5.9:1) or use the lighter shade only for decorative elements and large text.

White on brand blue

#ffffff on #2563eb = 5.9:1 — PASSES AA

White text on Tailwind's blue-600 is a reliable combination for primary buttons and call-to-action elements. It passes AA for all text sizes.

Yellow on white

#facc15 on #ffffff = 1.7:1 — CRITICAL FAIL

Yellow on white is one of the worst contrast combinations. Never use yellow text on white backgrounds. Use yellow as a background with dark text instead: #000000 on #facc15 = 13.7:1.

Color Contrast Best Practices for Accessible UI Design

Check every text size separately

A color pair that passes AA for large headings (3:1) may fail for body text (needs 4.5:1). Don't assume one ratio covers all uses — test your primary text color at every size you deploy it.

Never rely on color alone

WCAG 1.4.1 states that color must not be the sole visual means of conveying information. Error states, form validation, links, and status indicators all need a secondary cue: underlines, icons, borders, or patterns.

Test your dark mode independently

Switching to a dark background changes every contrast ratio. A color that passes on white may fail on your dark surface color. Run every text color through this checker for both light and dark variants of your theme.

Disabled states are exempt — but use it carefully

WCAG exempts disabled UI components from contrast requirements. However, if your disabled state is so low-contrast that users can't understand what the control does, you create a usability problem even if it's technically compliant.

Check interactive focus states

WCAG 2.1 Success Criterion 1.4.11 requires a 3:1 contrast ratio for focus indicators against adjacent colors. Invisible focus rings are a critical barrier for keyboard and switch access users.

Build a contrast-approved color system

Test your entire design token palette upfront — not individual screens. Map out which foreground tokens are AA-compliant on which background tokens, then enforce those pairings in your design system documentation.

Frequently Asked Questions

What contrast ratio do I need to pass WCAG AA?+

WCAG AA requires a contrast ratio of at least 4.5:1 for normal text (under 18pt or 14pt bold). Large text — defined as 18pt (24px) or 14pt bold (approximately 18.67px bold) — requires a minimum ratio of 3:1. UI components such as form inputs, icons, and focus indicators also require 3:1 against adjacent colors under WCAG 2.1 Success Criterion 1.4.11.

What is the difference between WCAG AA and AAA?+

AA is the standard compliance level required by law in most jurisdictions. AAA is the enhanced level that provides greater accessibility for users with more significant visual impairments. AA requires 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 for normal text and 4.5:1 for large text. AAA is not required for entire sites because some content — especially brand-critical design elements — cannot achieve 7:1 without losing visual identity.

Does ADA require specific color contrast ratios?+

The Americans with Disabilities Act (ADA) does not specify contrast ratios directly, but courts and the Department of Justice consistently apply WCAG 2.1 AA as the standard for website compliance with ADA Title III. Multiple major companies including Domino's, Netflix, and Winn-Dixie have faced ADA web accessibility lawsuits. WCAG AA compliance, including the 4.5:1 contrast requirement, is the legally defensible standard for US organizations.

Does contrast ratio apply to images and decorative elements?+

WCAG contrast requirements apply specifically to text and meaningful graphical elements. Purely decorative images — those that convey no information — are exempt. Text within images must meet the same contrast requirements as live text. Logotypes and brand wordmarks are exempt, but accessible design practice still recommends adequate contrast for them. Meaningful icons that convey function or status (like navigation icons or status indicators) must achieve a 3:1 ratio against their background under WCAG 2.1 Success Criterion 1.4.11.

How do I fix a failing contrast ratio without changing my brand colors?+

You have several options that don't require abandoning your brand palette. First, adjust the text color rather than the brand color — darkening or lightening the text often achieves compliance while preserving your background brand color. Second, add an intermediate layer: a semi-transparent dark or light overlay behind text on top of a brand-colored background can bring contrast up without changing the visible brand color. Third, increase the text size: colors that fail at 14px normal weight will often pass at 18px or 14px bold, since large text only requires 3:1. Use this tool's suggestion feature to find the nearest compliant shade to your current color.

Over 80% of websites fail color contrast checks

Don't ship another interface with invisible text. Use this tool to verify every color pair in your design system before it reaches users.

Free forever · No account · WCAG 2.1 compliant algorithm

21 Free Tools No Signup Required

Your Complete Design & Optimization Suite

Every tool runs entirely in your browser no uploads, no servers, no accounts. Fast, private, and free forever.

Design Tools

Colors, typography, CSS, SVG & more

Color Palette Generator

Popular

Generate beautiful color schemes using color theory algorithms monochromatic, complementary, triadic, and more.

  • 6 harmony types with HEX/RGB/HSL
  • One-click copy & unlimited palettes
  • WCAG accessibility contrast checking

Gradient Generator

Build stunning CSS gradients visually linear, radial, and conic and copy production-ready code instantly.

  • Linear, radial & conic gradients
  • Live CSS output with copy button
  • Unlimited color stops & angle control

Font Pairing

Discover expert Google Fonts combinations curated for optimal readability and aesthetic harmony.

  • 800+ professional pairings by mood
  • Live preview with custom text
  • Direct Google Fonts integration

CSS Generator

Generate production CSS visually flexbox, grid, typography, border, and box shadow with live preview.

  • Flexbox & Grid layout builder
  • Typography, border & shadow controls
  • CSS + Tailwind utility output

SVG Editor

Upload, edit, optimize, and convert SVG files entirely in your browser. Export clean SVG or React JSX.

  • Edit fill, stroke, dimensions, viewBox
  • Remove metadata & minify up to 70%
  • Convert SVG to JSX component

Favicon Generator

Generate favicons in all required sizes from any image PNG, ICO, and Apple Touch icons in one click.

  • All sizes: 16×16 to 512×512
  • ICO, PNG & Apple Touch export
  • No upload required 100% in browser

Design Token Generator

Build a complete design token system colors, spacing, typography, and shadows and export JSON or CSS variables.

  • Color, spacing & typography tokens
  • JSON & CSS custom property export
  • Tailwind config extension output

Optimization & Analysis

Images, accessibility, spacing & readability

Image Optimizer

Popular

Compress images up to 90% smaller WebP, AVIF, JPEG, PNG with filters, cropping, and rotation. 100% private.

  • WebP/AVIF/JPEG/PNG compression
  • Precision crop, rotate & filters
  • 100% client-side no uploads

Background Remover

AI

Remove image backgrounds instantly using on-device AI no uploads, no account. Download transparent PNG.

  • AI-powered accurate removal
  • Works on people, products & objects
  • Runs entirely in your browser

UI Shadow Generator

Generate a mathematically consistent shadow elevation system and export CSS variables or Tailwind config.

  • 3–10 elevation levels with live preview
  • 4 presets: Material, Soft, Sharp, Glow
  • CSS custom properties + Tailwind output

UI Spacing Scale

Build a harmonious spacing scale based on mathematical ratios and export it as CSS or Tailwind config.

  • Major second, golden ratio & more
  • Live ruler visualization per step
  • CSS & Tailwind spacing export

Border Radius Checker

Preview and compare border radius values in real time across multiple shapes and sizes.

  • Individual corner control
  • Live shape preview with real UI elements
  • CSS & Tailwind output

Color Contrast Checker

Check foreground/background color contrast ratios against WCAG AA and AAA accessibility standards.

  • WCAG AA & AAA compliance check
  • Live preview with real text samples
  • Suggested accessible color alternatives

UI Readability Analyzer

Analyze typography readability font size, line height, measure, and contrast with actionable improvement tips.

  • Flesch-Kincaid readability scoring
  • Font, spacing & contrast analysis
  • Actionable improvement suggestions

Links & Marketing

URLs, QR codes, tracking & security

URL Shortener

Links

Shorten any URL instantly with browser history, QR code export, and zero server tracking.

  • Instant URL shortening
  • Browser history & QR export
  • Zero server tracking

QR Code Generator

Custom QR codes for URLs, WiFi, vCards & more. Add colors, logo, download PNG or SVG.

  • URL, WiFi, vCard & more types
  • Custom colors & logo upload
  • PNG & SVG export

UTM Builder

Marketing

Build GA4-ready UTM tracking URLs with smart presets, validation, and CSV history export.

  • GA4-ready UTM parameters
  • Smart presets & validation
  • CSV history export

URL Cleaner

Privacy

Strip 50+ tracking parameters (UTM, fbclid, gclid, msclkid) with before/after comparison.

  • Removes 50+ tracking params
  • Before/after comparison view
  • One-click clean & copy

Link Preview Generator

SEO

See how your URL appears on Twitter, Facebook, LinkedIn & WhatsApp. Check OG metadata.

  • Social media preview simulation
  • OG metadata extraction
  • Card validator

Password Generator

Security

Cryptographically secure passwords, passphrases & PINs. All generated locally — never sent anywhere.

  • Crypto-secure generation
  • Passphrases & PINs supported
  • 100% local processing

Bio Link Builder

Creator

Build a link-in-bio page with live mobile preview, custom themes, and downloadable HTML.

  • Live mobile preview
  • Custom themes & styling
  • Downloadable HTML export

All tools are 100% free forever

No account, no subscription, no hidden limits. Every tool processes your data locally in the browser.

More tools added regularly