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.

Accessibility★ Free forever✓ No account🔒 No upload📴 Works offlineUpdated April 28, 2026

Free Color Contrast Checker — WCAG AA & AAA

Check whether your text and background color combination meets WCAG 2.1 accessibility contrast requirements — enter any foreground and background color in HEX, RGB, or HSL and get instant AA/AAA pass/fail results.

Browse all toolsBrowse more accessibility toolsBuilt by Achraf A., Full-Stack Developer · Morocco
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.

Was this tool helpful?

What is Color Contrast Checker?

Color Contrast Checker measures the contrast ratio between a text color and its background color, then reports whether the combination passes or fails the Web Content Accessibility Guidelines (WCAG) 2.1 success criteria for accessibility. Poor color contrast is one of the most common accessibility failures on the web — it makes text difficult or impossible to read for people with low vision, color blindness, or age-related vision changes.

WCAG defines contrast ratios on a scale from 1:1 (identical colors, no contrast) to 21:1 (black on white). The standard defines two compliance levels: AA requires a minimum 4.5:1 ratio for normal text and 3:1 for large text (18pt or 14pt bold). AAA requires 7:1 for normal text and 4.5:1 for large text. Most legal accessibility standards — ADA in the US, EN 301 549 in Europe, and AODA in Canada — reference WCAG AA as the minimum requirement.

This tool is used by web designers, front-end developers, content editors, and accessibility auditors to verify that color pairs used in typography, buttons, form labels, navigation, and UI components meet the minimum contrast threshold before publishing. It is also useful for exploring accessible color palette alternatives when a current color fails the check.

How to use Color Contrast Checker in 3 steps
  1. 1

    Enter the foreground (text) color

    Type or paste the text color in HEX (#3b82f6), RGB (59, 130, 246), or HSL format.

  2. 2

    Enter the background color

    Add the background color the text appears on — the page background, card background, or button color.

  3. 3

    Read the contrast ratio and WCAG result

    The tool shows the exact contrast ratio and whether the combination passes WCAG AA and AAA for both normal and large text sizes.

Key features and benefits
  • Checks WCAG 2.1 AA and AAA contrast compliance instantly
  • Accepts HEX, RGB, and HSL color input formats
  • Shows pass/fail for both normal text and large text thresholds
  • Useful for accessibility audits, design reviews, and component testing
  • No sign-up — runs entirely in the browser
Common use cases

A designer checks whether the white text on a brand blue button passes WCAG AA before the component ships to production.

An accessibility auditor reviews a client site's primary text colors against their background to identify contrast failures for remediation.

A developer uses the checker to pick an accessible gray text color for secondary UI labels that still passes 4.5:1 against a light background.

Why browser-based works better

A dedicated contrast checker is faster than opening browser DevTools or an accessibility audit report just to check whether one color pair is compliant.

Showing both AA and AAA thresholds for both normal and large text in one result helps you understand exactly where your design stands — not just 'pass' or 'fail' but which level and which text size.

Color Contrast Checker FAQs

Quick answers about the workflow, privacy, and where this tool fits in a broader job.

What contrast ratio is required for WCAG AA?

WCAG AA requires at least 4.5:1 contrast ratio for normal body text and at least 3:1 for large text (18px bold or 24px regular). Most web accessibility laws require AA compliance at minimum.

What is WCAG AAA contrast?

WCAG AAA requires at least 7:1 for normal text and 4.5:1 for large text. AAA is a higher standard and can be difficult to achieve with colored text — it is typically targeted for critical interfaces where maximum readability is essential.

Does contrast requirement apply to placeholder text?

Yes. WCAG 1.4.3 applies to all text visible to users, including placeholder text in form inputs, which must meet at least 4.5:1 if it conveys information users need to complete the form.

Do images or decorative text need to pass contrast checks?

Decorative text that conveys no information is exempt from contrast requirements. Logos and brand typography in images are also exempt. All functional and informational text must pass.

What is a good contrast ratio for UI design?

4.5:1 is the legal minimum for most accessibility standards. Aim for 7:1 or higher for body text to maximize readability across all users and viewing conditions.

Keep the workflow moving with nearby tools that solve the next likely step.

Built and maintained by

Achraf A.

Founder & developer — built and maintains every tool on this site

Last updated:

Tested in Chrome, Firefox, and Safari on desktop and mobile.


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.

☕ Support Us