Xgenious
developer

Free Color Contrast Checker — WCAG AA & AAA Accessibility

Color contrast ratio measures the luminance difference between a foreground (text) color and a background color. WCAG 2.1 requires a minimum 4.5:1 for normal text (AA) and 7:1 for AAA. This tool calculates the exact ratio and shows pass/fail status for both standards instantly as you type.

Free — No SignupRuns in BrowserData Never UploadedPopular tool

developer

Check foreground/background color contrast for WCAG AA and AAA compliance.

  • Calculates the exact WCAG relative-luminance contrast ratio
  • Pass/fail for WCAG AA and AAA — normal text, large text, and UI components
  • Accepts hex color input with live color picker
  • Live preview renders actual text on the chosen background color
  • Swap foreground and background colors with one click
  • Covers SC 1.4.11 Non-text Contrast (icons, borders, focus rings)
  • Client-side only — no colors are uploaded or stored
Features

Everything you need in one Color Contrast Checker (WCAG)

Accurate contrast ratio

Uses the official WCAG relative-luminance formula to return the exact ratio between 1:1 and 21:1 — the same math browsers and audit tools apply.

AA and AAA pass/fail

Shows compliance for every WCAG threshold at once: normal text, large text, and the 3:1 minimum for icons and UI components under SC 1.4.11.

Live text preview

See your chosen colors rendered as real large and normal text so you can judge legibility, not just the number.

Hex & color picker input

Enter a hex code directly or use the browser color picker — the contrast ratio recalculates instantly on every change.

How It Works

How to use Color Contrast Checker (WCAG)

01

Enter foreground color

Type your text color as a hex code, RGB, or HSL value.

02

Enter background color

Type your background color. The contrast ratio updates in real time.

03

Check WCAG results

See the ratio and pass/fail for WCAG AA (4.5:1) and AAA (7:1) for normal and large text.

Format Comparison

WCAG 2.1 contrast requirements by content type

ContentLevel AALevel AAA
Normal text (under 18pt / 24px)4.5:17:1
Large text (18pt+ / 24px+, or 14pt+ bold)3:14.5:1
UI components & graphical objects3:13:1
Incidental / disabled / logo textNo requirementNo requirement
Troubleshooting

How to fix common syntax errors

Most “invalid JSON” failures come from a small set of mistakes. Paste the failing JSON above, click Validate, and the tool points you at the exact line and column.

Non-hex color formatrgb(28, 35, 48) or "navy"

Convert to 6-digit hex first. In Chrome DevTools Styles panel, type any CSS color and hover the swatch — DevTools shows the hex equivalent. Alternatively, use CSS `color-mix()` or a color converter.

3-digit hex shorthand fails#fff or #369

Expand to 6 digits: #fff → #ffffff, #369 → #336699. Each single digit repeats to form a pair. The tool requires full 6-digit hex input.

Semi-transparent background colorrgba(0,0,0,0.5) on white

WCAG contrast applies to the final rendered color, not the CSS value. Composite the alpha over the actual page background first: a 50% black on white renders as #808080. Calculate contrast against that composited hex.

Ratio passes but text still looks unreadable5:1 contrast, thin light font

The luminance formula does not account for font weight, letterform size, or hue contrast. Increase contrast above the minimum, use at least 16px body text, and prefer regular or medium weight over thin fonts.

Text on a gradient backgroundWhite text over blue-to-purple gradient

WCAG requires checking contrast at the point of lowest contrast — typically the lightest part of the gradient. Measure at both ends and use the worst ratio. If either end fails, darken the gradient or add a semi-transparent overlay.

Focus ring fails non-text contrastDefault browser outline on light background

SC 1.4.11 requires 3:1 for focus indicators. Default outlines often fail. Use a 2px solid outline in a color that achieves 3:1 against both the focused element background and the surrounding page background.

FAQ

Frequently asked questions

WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios between foreground text and background color to ensure readability for users with low vision or color blindness. WCAG 2.1 Level AA requires 4.5:1 for normal-sized text (below 18pt or 14pt bold) and 3:1 for large text. Most legal accessibility standards worldwide — US ADA, EU EN 301 549, UK Equality Act — reference WCAG AA as the required level.

Have a project in mind?

We turn ideas into production-ready software — SaaS, web apps, mobile, and AI agents. Fixed price. Committed timeline. No surprises.

Let's talk