WCAG Color Contrast Checker — Test Text on Background Free

Quick Answer

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

WCAG 2.1 Level AA requires a contrast ratio of at least 4.5:1 for normal-sized text (under 18pt / 14pt bold) and 3:1 for large text (18pt+ / 14pt+ bold). For UI components and icons: 3:1. Level AAA requires 7:1 for normal text and 4.5:1 for large text. Enter your foreground and background colors above to get an instant pass/fail result.

Free Color Contrast Checker — check WCAG accessibility contrast ratios online

Instantly test any two colors for WCAG 2.1 accessibility compliance. Calculate contrast ratios, get Level AA and Level AAA pass/fail grades, preview text readability, and simulate color blindness — completely free, no upload required.

Foreground (text)

rgb(26, 26, 26) · Luminance: 0.0103

Background

rgb(255, 255, 255) · Luminance: 1.0000

Contrast Ratio

17.40:1

WCAG AA

Normal text (< 18px)

Pass

Requires 4.5:1

WCAG AA

Large text (≥ 18px or 14px bold)

Pass

Requires 3.0:1

WCAG AAA

Enhanced (7:1 normal / 4.5:1 large)

Pass

Requires 7.0:1

APCA — Accessible Perceptual Contrast Algorithm

Lc Value

104.8

Passes — body text
Lc 90 — Enhanced (body)
Lc 75 — Body text
Lc 60 — Fluent 18px+
Lc 45 — Large 24px+

APCA is the perceptual contrast model proposed for WCAG 3.0. It accounts for spatial frequency, adaptation, and human visual system non-linearity — providing more accurate predictions than the WCAG 2.x formula for modern displays.

Text Preview

Small (12px)Caption / label text

The quick brown fox jumps over the lazy dog

Normal (16px)Body text

The quick brown fox jumps over the lazy dog

Large (24px)Subheading

The quick brown fox jumps over the lazy dog

Bold (18px)Bold / heading

The quick brown fox jumps over the lazy dog

WCAG 2.2 — What Changed for Color Contrast

WCAG 2.2 (published October 2023) did not change the color contrast thresholds — AA (4.5:1 normal, 3:1 large) and AAA (7:1 normal, 4.5:1 large) remain identical to WCAG 2.1.

The main additions in WCAG 2.2 related to contrast are: SC 1.4.11 Non-text Contrast (AA, 3:1 for UI components and graphical objects) and the removal of SC 4.1.1 Parsing. Focus indicators (SC 1.4.13 Focus Appearance) now require a minimum 3:1 contrast between focused and unfocused states.

APCA (Accessible Perceptual Contrast Algorithm) is expected to replace the current formula in the upcoming WCAG 3.0 draft, but it is not yet normative. Use this tool to check both standards during the transition period.


What a 4.5:1 contrast ratio actually means

WCAG 2.1 requires a 4.5:1 contrast ratio for normal text (under 18pt) at Level AA — the legal standard in the US, EU, and UK for public-facing websites. The ratio is calculated from the relative luminance of each color, where pure white is 1.0 and pure black is 0. The formula weights the R, G, and B channels non-linearly to approximate how human vision perceives brightness differences. Full explanation with worked examples here.

In practice: black text (#000) on white (#fff) is 21:1 — the maximum. The popular "gray on white" pattern ("#767676 on #ffffff") is exactly 4.54:1 — just barely passing. One step lighter, #777, drops to 4.48:1 and fails. This is the zone where most accessibility violations live in production: designers choose gray text for visual hierarchy, then pick a shade that's two hex values too light.

The patterns that fail most often

PatternTypical ratioPass/Fail AAFix
Placeholder text (#9CA3AF on white)2.4:1FAILUse #6B7280 or darker
Secondary text (#6B7280 on white)4.6:1PASS (barely)Avoid on off-white backgrounds
Disabled button (#9CA3AF on #F3F4F6)2.0:1FAILWCAG exempts disabled elements
White on brand blue (#3B82F6)3.0:1FAILDarken to #1D4ED8 for white text
White on green (#22C55E)2.3:1FAILUse dark text or darken to #15803D
Yellow text on white1.1–1.8:1FAILYellow is near-invisible on white

What automated checkers can't catch

This checker evaluates flat color pairs. It cannot check text on gradient backgrounds, text over images, or text where color changes on hover/focus. For gradients, check both the lightest and darkest points of the gradient against your text color and use the lower (worse) ratio as your reference. For images, the 1:1 rule of thumb: if the background contains a range of tones, a semi-transparent dark overlay behind the text is usually more reliable than trying to find a single text color that passes everywhere.

WCAG AA-passing color combinations — ready to use

WCAG 2.1 Level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt+) and UI components. These combinations all pass:

Text colorBackgroundContrast ratioUse case
#000000 (Black)#FFFFFF (White)21:1 ✓ AAABody text, high-readability documents
#FFFFFF (White)#000000 (Black)21:1 ✓ AAADark mode body text
#1A1A2E (Dark navy)#FFFFFF (White)16.1:1 ✓ AAAHeading text on white backgrounds
#FFFFFF (White)#0057B8 (Blue)5.1:1 ✓ AAPrimary CTA buttons
#FFFFFF (White)#2E7D32 (Green)5.1:1 ✓ AASuccess state buttons
#FFFFFF (White)#B71C1C (Dark red)5.9:1 ✓ AAError/danger buttons
#212121 (Near black)#F5F5F5 (Light grey)15.3:1 ✓ AAACard content on light backgrounds
#1B5E20 (Dark green)#E8F5E9 (Light green)7.2:1 ✓ AAASuccess alerts / banners
#B71C1C (Dark red)#FFEBEE (Light red)5.8:1 ✓ AAError alerts / banners
#FFFFFF (White)#333333 (Dark grey)12.6:1 ✓ AAADark headers, nav bars

Paste any pair above into the checker to see the live preview and confirm the ratio for your specific context. Note: these ratios apply to text only — icons and non-text UI components need a 3:1 ratio (WCAG 1.4.11 Non-text Contrast).

TheFreeAITools — Free Color Contrast Checker is a fully private, browser-based tool for testing color contrast ratios against WCAG 2.1 accessibility standards without any uploads. All calculations happen locally on your device in 2026 — your brand colors and design palettes are never transmitted to external servers. Supports HEX, RGB, and HSL color formats with Level AA and Level AAA grading, text preview, and color blindness simulation — completely free with no account or design software required.

Video demo

☕ Support Us