WCAG Contrast Checker
Check the contrast ratio of any text and background color pair. See AA and AAA verdicts for normal and large text, with a live preview in both text sizes.
What is a contrast ratio?
A contrast ratio measures how easy text is to read, from 1.00:1 (invisible) to 21.00:1 (black on white). The ratio comes from the relative luminance of the two colors: the lighter color divided by the darker one, with a small fixed offset in the formula. A higher number always means easier reading, and the number is the same whichever color is the text.
The scale is not linear in how it looks: the jump from 1.00:1 to 3.00:1 is the difference between unreadable and barely readable, while the jump from 7.00:1 to 21.00:1 is the difference between good and excellent. That is why the WCAG limits sit where they do.
Ratio scale — where your pair lands
Your pair: 21.00:1 — AA normal Pass, AAA normal Pass, AA large Pass, AAA large Pass
The AA and AAA limits
Normal text needs 4.50:1 for AA and 7.00:1 for AAA, while large text needs 3.00:1 for AA and 4.50:1 for AAA. Large text gets lower limits because big, bold letters are easier to read at the same contrast. AA is the level most websites must meet; AAA is the stricter level for the highest accessibility standard.
Check the verdicts against the thresholds, not against how the preview looks to you. A pair can look fine on a bright screen and still fail, and a pair can look dull and still pass. The numbers decide, because they measure luminance rather than taste.
Four verdicts for your pair — live from the tool above
AA normal
Pass
AAA normal
Pass
AA large
Pass
AAA large
Pass
Green means Pass, red means Fail — the words carry the verdict, never color alone.
White on red: a pair that splits the verdicts
White text on a red background scores 4.00:1 — it fails AA for normal text but passes AA for large text. The ratio is below the 4.50:1 normal-text limit by 0.50, so body copy in white on red fails AA. It is above the 3.00:1 large-text limit, so a large heading in the same pair passes AA.
This is the most common surprise in contrast checking: a pair that looks bold and readable still fails for body text. The fix is to darken the red or use the pair only for large headings, never for paragraphs or buttons with small labels.
White on red — the same sentence at both sizes
Body copy in white on red — Fail AA (4.00:1)
A large heading — Pass AA (4.00:1)
Ratio 4.00:1: AA normal Fail, AAA normal Fail, AA large Pass, AAA large Fail.
White on yellow and black on yellow
White on yellow scores 1.07:1 and fails every test, while black on yellow scores 19.56:1 and passes AAA. White and yellow are both very light, so there is almost no luminance difference between them — 1.07:1 is nearly invisible text. Black and yellow are near opposites in lightness, so 19.56:1 is close to the 21.00:1 maximum.
Yellow is the classic warning color precisely because black on yellow is so readable. If your design uses a yellow background, use black or very dark text on it, never white. The same rule applies to any pale background: the text must be dark.
The yellow test — two panels, two very different results
White text on yellow
Fail — all four verdicts (1.07:1)
Black text on yellow
Pass AAA — all four verdicts (19.56:1)
White on yellow 1.07:1 fails every test; black on yellow 19.56:1 passes AAA.
A real blue that passes AA
White text on #3b5bdb scores 5.67:1, which passes AA for normal text. The ratio clears the 4.50:1 limit by 1.17, so body copy in white on this blue passes AA, though it stays below the 7.00:1 AAA limit for normal text. For AAA normal text you would need a darker blue or a higher ratio still.
This pair is a useful working example because #3b5bdb is a real blue used in design systems, not a test extreme. It shows that a mid blue can carry white body text — the color does not have to be navy for white text to pass AA.
White text on #3b5bdb at both sizes
Body copy in white on #3b5bdb — Pass AA (5.67:1)
A large heading — Pass AA (5.67:1)
Ratio 5.67:1: AA normal Pass, AAA normal Fail, AA large Pass, AAA large Pass — the AAA normal-text Fail keeps the claim honest.
How to fix a failing pair
Darken the darker color or lighten the lighter color until the ratio crosses the limit you need. Moving one color by a small step often gains the 0.50 or 1.00 needed to pass: a slightly darker background or slightly darker text is usually enough, and the design barely changes. Do not change the hue — lightness is what moves the ratio.
Test the exact pair you will ship, at the exact size you will ship it. A heading that passes at large size can fail when the same colors are reused for a small button label, so check every size the pair appears in, not just the one you tested first.
Fix-it steps — white text on red, darkened step by step
| Background | Ratio | AA normal | AA large |
|---|---|---|---|
| #FF0000 | 4.00:1 | Fail | Pass |
| #D00000 | 5.70:1 | Pass | Pass |
| #B00000 | 7.38:1 | Pass | Pass |
| #900000 | 9.61:1 | Pass | Pass |
| #700000 | 12.43:1 | Pass | Pass |
Each darker step climbs the ratio — watch AA normal flip from Fail to Pass as the red darkens.
All color tools
21 tools, one topic — see About Hex Color Code Picker for who built this site.
- Color Picker from ImageUpload an image, click a pixel, and read its HEX code.
- Screen EyedropperSample any pixel on your screen.
- RGB to HEX ConverterTurn three RGB numbers into one HEX code.
- HEX to RGB ConverterTurn a HEX code into three RGB numbers.
- HEX to HSL ConverterTurn a HEX code into hue, saturation, and lightness.
- HSL to HEX ConverterTurn HSL values back into a HEX code.
- HEX to HSV ConverterTurn a HEX code into hue, saturation, and value.
- HEX to CMYK ConverterTurn a HEX code into approximate print values.
- RGB to HSL ConverterTurn RGB numbers into hue, saturation, and lightness.
- HEX to OKLCH ConverterTurn a HEX code into the modern OKLCH format.
- Color ConverterSee one color in every format at once.
- HEX to RGBA ConverterTurn a HEX code into RGB with transparency.
- Color Name to HEXLook up any of the 148 CSS named colors.
- Color Palette GeneratorBuild a five-color palette from one color.
- Shades GeneratorBuild 10 tints and 10 shades from one color.
- Gradient GeneratorBuild a linear or radial gradient and copy the CSS.
- Contrast CheckerCheck any text and background pair for AA and AAA.
- Color MixerMix two colors and see the result.
- Random Color GeneratorPick a random color from all 16,777,216 HEX colors.
- Color Blindness SimulatorSee your colors as color-blind users see them.
- Color ChartThe 148 named colors with HEX, RGB, and HSL.
No tool matches your search.
Frequently asked questions
You need 4.50:1 for WCAG AA and 7.00:1 for WCAG AAA. Normal text means body copy and small labels. Enter any foreground and background color in the tool and it shows all four verdicts, so you can see at once whether your pair passes AA, AAA, or neither.
Large text is 18pt (24px) or larger, or 14pt (about 18.66px) bold or larger. Large text needs only 3.00:1 for AA and 4.50:1 for AAA, because big letters are easier to read. The tool previews your pair in both sizes so you can see the difference.
White on red scores 4.00:1, which is 0.50 below the 4.50:1 AA limit for normal text. It still passes AA for large text, because that limit is only 3.00:1. Use the pair for large headings only, or darken the red until the ratio reaches 4.50:1.
No — white on yellow scores 1.07:1 and fails every WCAG test. White and yellow are both very light, so the text is nearly invisible. Use black text on yellow instead: that pair scores 19.56:1 and passes AAA.
No — you can enter any foreground and any background color. Most rival checkers only test a color against black or white, which does not answer the real question: does my text color work on my background color. This tool tests the exact pair you plan to use.
The highest ratio is 21.00:1, for black text on a white background. The lowest is 1.00:1, for two identical colors. A ratio of 19.56:1 for black on yellow is close to the maximum, which is why that pair is used for warnings and signs.