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.
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
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 to use Color Contrast Checker (WCAG)
Enter foreground color
Type your text color as a hex code, RGB, or HSL value.
Enter background color
Type your background color. The contrast ratio updates in real time.
Check WCAG results
See the ratio and pass/fail for WCAG AA (4.5:1) and AAA (7:1) for normal and large text.
WCAG 2.1 contrast requirements by content type
| Content | Level AA | Level AAA |
|---|---|---|
| Normal text (under 18pt / 24px) | 4.5:1 | 7:1 |
| Large text (18pt+ / 24px+, or 14pt+ bold) | 3:1 | 4.5:1 |
| UI components & graphical objects | 3:1 | 3:1 |
| Incidental / disabled / logo text | No requirement | No requirement |
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.
rgb(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.
#fff or #369Expand to 6 digits: #fff → #ffffff, #369 → #336699. Each single digit repeats to form a pair. The tool requires full 6-digit hex input.
rgba(0,0,0,0.5) on whiteWCAG 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.
5:1 contrast, thin light fontThe 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.
White text over blue-to-purple gradientWCAG 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.
Default browser outline on light backgroundSC 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.
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.
You might also need
Strong Password Generator
Generate cryptographically secure passwords instantly.
PNG to WebP Converter
Convert PNG images to WebP format online. Reduce file size by up to 30% with no quality loss.
JSON Formatter & Validator
Format, validate, and minify JSON instantly in your browser.
SQL Formatter
Format and beautify SQL queries with consistent indentation and keyword casing.
Regex Tester
Test regular expressions against strings with live match highlighting.
.htaccess Generator
Generate Apache .htaccess rules for redirects, HTTPS, caching, and security headers.
.env File Generator
Generate a boilerplate .env file for Laravel, Next.js, Node.js, or Docker.
Base64 Encoder / Decoder
Encode and decode Base64 strings instantly in your browser.
Further reading
Authority documentation and specifications behind this tool.
Need this built into your product?
We design and build custom software — SaaS platforms, MVPs, AI agents, and web apps.
Custom SaaS Development
End-to-end SaaS — API, auth, billing, dashboard, deployment.
MVP Development
Working product in 6–8 weeks. Fixed price, committed timeline.
AI Agent Development
Custom AI agents and workflow automation for your stack.
Web App Development
Full-stack web apps built with modern frameworks and best practices.
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.