Why color contrast matters
Light gray text on white looks clean on a designer's calibrated monitor. On a phone in bright sunlight, on an old laptop screen or for someone with low vision, it turns into a squint. Contrast sensitivity also drops with age, so readable colors help far more people than you might think.
This color contrast checker computes the WCAG 2.x contrast ratio between a text color and a background color, tells you for each criterion whether the pair passes AA or AAA, and suggests the nearest corrected color when it fails.
How to use it
- Under "Text color" and "Background color", use the picker or type a code: HEX (
#767676), RGB, HSL or a CSS color name such asrebeccapurple. The "Opacity" slider handles transparency. - Read the contrast ratio and the results table. Every cell shows a symbol and the word "Pass" or "Fail", not just a color.
- Check the "Live preview": normal text, large text, bold text, a button, a link, an input field and an icon.
- If the pair fails, "Fixed colors" offers a text or background color that reaches AA or AAA; "Apply" puts it in place. "Swap" exchanges the two colors.
- To audit a whole design system, paste your pairs into "Check a list of pairs", one per line, and click "Check the list".
"Copy the link to these colors" gives you a URL that reopens the same pair. Everything runs in your browser.
The contrast ratio in plain words
Each color gets a relative luminance, from 0 for black to 1 for white, computed from its red, green and blue values (green counts most, blue least). The ratio is (lighter luminance + 0.05) divided by (darker luminance + 0.05). It runs from 1:1, two identical colors, to 21:1, black on white. Thresholds apply to the exact ratio with no rounding: 4.499 does not reach 4.5.
| Text on white | Ratio | Normal text |
|---|---|---|
| #000000 (black) | 21:1 | AAA |
| #0000FF (blue) | 8.59:1 | AAA |
| #767676 | 4.54:1 | AA |
| #777777 | 4.48:1 | Fail (AA for large text) |
| rgba(0, 0, 0, 0.5) | 3.95:1 | Fail (AA for large text) |
For a semi-transparent color, the tool first works out the color actually displayed: black at 50% opacity on white renders as #808080, hence 3.95:1. A transparent background is laid over white.
AA and AAA thresholds
- Normal text: 4.5:1 for AA, 7:1 for AAA.
- Large text: 3:1 for AA, 4.5:1 for AAA. Text counts as large from 18 point, about 24 px, or from 14 point bold, about 18.66 px.
- UI components and graphics: 3:1 for input borders, standalone icons, focus indicators and chart lines. There is no AAA level for this one.
AA is the level most websites aim for, and it is the level that accessibility laws usually point to. In the United States, public bodies and many businesses are expected to make their sites accessible; the European Union has directives for public sector sites and many private services. What applies to you depends on your sector and country, so check with a specialist if you are unsure.
The "Show the APCA score" box adds a score from a newer method that is still experimental and may shape future guidelines; it has no official standing today.
Design tips for readable colors
- Keep your brand hue and change only lightness, which is what "Fixed colors" does. Example:
#999999on white gives just 2.85:1; the tool suggests#767676, the lightest gray that reaches 4.5:1. - Never rely on color alone to carry meaning: add a word, an icon or an underline. The "Color blindness simulation" shows how the pair looks to someone who confuses red and green.
- For text over a photo, test the lightest area of the image.
- If you ship a dark theme, check the reversed pairs too.
Frequently asked questions
What contrast ratio should I aim for?
At least 4.5:1 for body text and 3:1 for large text and interface elements: that is level AA. Aim for 7:1 for body copy if many of your readers are older.
Why does #777777 fail when it looks like #767676?
The threshold is strict: #777777 gives 4.48:1 and #767676 gives 4.54:1. Your eye can't tell them apart, but the line falls right between them.
Does placeholder text need enough contrast?
Yes. Placeholder text is text, so it needs 4.5:1. Only disabled controls are exempt under WCAG.
Are my colors sent anywhere?
No. The current pair and your list are only stored on this device for your next visit.