Contrast Checker
WCAG 2.2 and APCA contrast with fixes and color blindness previews. Runs in your browser.
About this contrast checker
This contrast checker tells you whether text in one color is readable on another, and gives you the WCAG 2.2 pass or fail for each case. It is for developers fixing accessibility audit findings, designers picking brand colors and testers writing up reports.
Enter a text color and a background in any CSS format. You get the contrast ratio, AA and AAA results for normal text, large text and UI parts, and the newer APCA score. If the pair fails, the tool finds the nearest color that passes by changing only its lightness, so your blue stays blue.
Everything runs in your browser. Once you have a passing color, you can convert it to HSL or OKLCH for your stylesheet.
Features
Any CSS color, with opacity
Type HEX, rgb(), hsl(), hwb(), oklch() or a name, or use the picker. Both colors have an opacity slider, and translucent colors are blended the way the screen draws them.
Every WCAG 2.2 check
Pass or fail for SC 1.4.3 (AA), SC 1.4.6 (AAA) and SC 1.4.11 non-text contrast, each with its threshold.
APCA score
APCA lightness contrast (Lc) from the published APCA-W3 constants, with a note on what that score is good enough for.
Nearest passing color
Pick a target from AA 4.5 to APCA 90 and the color to change. You get the smallest OKLCH lightness change that passes. One click applies it.
Live preview
Your own sample text at 24px, 18.67px bold, 16px and 13px, next to a button outline, an icon and a toggle.
Color blindness simulation
The pair as it might look with protanopia, deuteranopia, tritanopia and achromatopsia, with each simulated ratio.
Shareable link
Copy a link that stores both colors, so a teammate opens the same pair.
How to use the contrast checker
- 1Enter a text color and a background in any CSS format, or use the pickers and opacity sliders.
- 2Read the ratio, the AA and AAA results, the APCA score and the live preview.
- 3If it fails, pick a target and click Apply on the suggested color.
When to use it
Fixing an audit finding
An audit flags #999999 text on white at 2.84:1. Choose AA 4.5 and Change text, and you get #767676. Apply it and every text check turns green.
Brand buttons
Check white text on your brand blue, then check the button border against the page for the 3:1 non-text rule.
Colors from a screenshot
Pull the colors out of a screenshot, paste them here, and see which text and background pairs actually pass.
Charts and status colors
Use the color blindness previews to see whether red and green labels stay distinct. If they merge, add an icon or a label.
What contrast ratio does WCAG 2.2 require?
WCAG compares the relative luminance of two colors as a ratio. It runs from 1:1 for identical colors to 21:1 for black on white. Each threshold belongs to a success criterion (SC).
- SC 1.4.3, AA: 4.5:1 for normal text, 3:1 for large text.
- SC 1.4.6, AAA: 7:1 for normal text, 4.5:1 for large text.
- SC 1.4.11, AA: 3:1 for UI parts such as input borders, focus rings and icons you need to see.
- Large text means at least 24px, or 18.67px when bold.
Is APCA better than the WCAG contrast ratio?
For perception, often yes. For compliance, no. The WCAG 2 formula gives the same ratio whichever color is the text, and it tends to overrate dark pairs.
APCA (Accessible Perceptual Contrast Algorithm) models how people see lightness on screens, so swapping text and background changes the score. Black on white is about Lc 106 and white on black about Lc -108. Roughly, Lc 75 suits body text, Lc 60 larger content text and Lc 45 headlines. APCA is not part of WCAG 2.2, so use the ratio for audits and APCA as a second check, especially in dark themes.
Does opacity change contrast?
Yes, and by a lot. A translucent color has no contrast of its own. Black text at 50% opacity on white is really #808080, which gives about 3.9:1 and fails AA for body text.
This tool blends a translucent background over a white page, then the text over that background, rounding to the 8-bit values a screen uses. The blended colors are listed under the preview.
How does the tool pick a passing color?
It keeps hue and chroma in OKLCH and steps the lightness both lighter and darker. The passing option closer to your original wins. If the new color falls outside sRGB, chroma drops just enough to fit, and you are told. If no lightness works, change the other color or raise the text opacity. When you need matching shades for the rest of your UI, build a palette around the fixed color.
Why use Mavros
| Mavros | Typical upload sites | |
|---|---|---|
| Color input | Any CSS color, including oklch() | HEX only |
| Opacity | On text and background | Text only, or ignored |
| Checks | Text and UI parts, AA and AAA | Text only |
| APCA | Lc score with guidance | Missing |
| Failing pairs | Nearest passing color, hue kept | Trial and error |
| Color blindness | Four simulations | Separate tool |
Tips
- #777777 on white looks fine but gives 4.47:1 and fails AA. #767676 is the lightest gray that passes.
- Check hover, focus and disabled states too, not just the default button.
- Thin fonts need more contrast than the ratio suggests. Look at their APCA score.
- Test the final pair in a real page with the HTML playground, since font rendering changes how contrast feels.
Questions
What contrast ratio do I need for WCAG AA?
You need 4.5:1 for normal text and 3:1 for large text (SC 1.4.3). Buttons, input borders, icons and focus indicators need 3:1 against what is next to them (SC 1.4.11).
What counts as large text?
Large text is at least 24px (18pt) in regular weight, or 18.67px (14pt) in bold. It needs 3:1 for AA and 4.5:1 for AAA.
What is the difference between AA and AAA?
AA is the level most laws and policies require. AAA is stricter, with 7:1 for normal text. Many teams aim for AA everywhere and AAA for long articles.
What is APCA and should I use it?
APCA is a newer contrast method that accounts for text polarity and how people perceive lightness. It is not part of WCAG 2.2, so use the ratio for compliance and APCA as an extra check.
Why is my APCA score negative?
A negative Lc means light text on a dark background. Only the size matters, so Lc -75 is as strong as Lc 75.
How do I fix a color that fails?
Pick a target, choose to change the text or the background, and click Apply on the suggestion. It is the nearest lighter or darker version that passes, with the same hue.
Why does 4.49:1 fail when it is so close to 4.5?
WCAG thresholds are hard minimums with no rounding. This tool cuts the ratio to two decimals before comparing, so anything below 4.50 fails.
Are my colors sent anywhere?
No. All checks run in your browser. Browse the other color and design tools for palettes, gradients and conversions that work the same way.