Color Contrast Checker
Test a text color on a background against WCAG 2.2, see where it passes, and get the closest color that does.
2.86:1: fails AA for all text
Large text, 24 px (18 pt)
Normal text at 16 px. This is how a paragraph reads in these two colors on a screen.
Contrast ratio
2.86:1
- AANormal textFail 4.5:1
- AALarge textFail 3:1
- AAANormal textFail 7:1
- AAALarge textFail 4.5:1
- AAUI and graphicsFail 3:1
Nearest passing color
Text color: #ce4c00 4.50:1
Or background: #313131 4.53:1
Palette grid
Every text color (rows) on every background (columns), with the best text level each pair reaches.
| Text color | #1e1c19 | #ffffff | #ff6a13 | #f2e5c3 | #2f7a3a | #6fb1ff |
|---|---|---|---|---|---|---|
| #1e1c19 | Same color | Aa16.99:1AAA | Aa5.92:1AA | Aa13.57:1AAA | Aa3.21:1AA large | Aa7.61:1AAA |
| #ffffff | Aa16.99:1AAA | Same color | Aa2.86:1Fail | Aa1.25:1Fail | Aa5.29:1AA | Aa2.23:1Fail |
| #ff6a13 | Aa5.92:1AA | Aa2.86:1Fail | Same color | Aa2.29:1Fail | Aa1.84:1Fail | Aa1.28:1Fail |
| #f2e5c3 | Aa13.57:1AAA | Aa1.25:1Fail | Aa2.29:1Fail | Same color | Aa4.22:1AA large | Aa1.78:1Fail |
| #2f7a3a | Aa3.21:1AA large | Aa5.29:1AA | Aa1.84:1Fail | Aa4.22:1AA large | Same color | Aa2.37:1Fail |
| #6fb1ff | Aa7.61:1AAA | Aa2.23:1Fail | Aa1.28:1Fail | Aa1.78:1Fail | Aa2.37:1Fail | Same color |
Ratios follow the WCAG 2.2 formula and are cut, not rounded, to two decimals, so 4.499 never shows as a pass.
How to check color contrast
Contrast is how far apart two colors are in brightness. WCAG measures it as a ratio from 1:1 (the same color) to 21:1 (black on white). This checker works it out with the formula in the WCAG 2.2 Recommendation, for any two colors you give it.
- Step 1Set the two colorsPick each color, or type it as hex, RGB or HSL. Swap turns text into background and back.
- Step 2Read the ratioThe ratio and five pass or fail lamps update at once, with a live sample of text and a button.
- Step 3Fix a failPick a target and tap Use it to take the nearest text or background color that reaches it.

The math follows the definitions in WCAG 2.2. Each channel is turned into linear light, the three are weighted 0.2126 for red, 0.7152 for green and 0.0722 for blue to get the relative luminance, and the ratio is the lighter luminance plus 0.05 divided by the darker plus 0.05. The checker is unit tested on known pairs: grey 777777 on white is 4.48:1 and just fails AA, while 767676 is 4.54:1 and passes.
WCAG AA and AAA contrast levels
WCAG 2.2 has three success criteria for contrast. These are the ratios in the W3C Recommendation of 12 December 2024, which we read on October 23, 2026:
| Success criterion | Level | Applies to | Minimum |
|---|---|---|---|
| 1.4.3 Contrast (Minimum) | AA | Normal text | 4.5:1 |
| 1.4.3 Contrast (Minimum) | AA | Large text | 3:1 |
| 1.4.6 Contrast (Enhanced) | AAA | Normal text | 7:1 |
| 1.4.6 Contrast (Enhanced) | AAA | Large text | 4.5:1 |
| 1.4.11 Non-text Contrast | AA | UI components and graphics | 3:1 |
Large scale text is at least 18 point, or 14 point bold: 24 CSS pixels, or about 18.7 pixels in bold. Non-text contrast covers what you need to see to use a control, such as the border of a text field or the shape of an icon, and the parts of a chart or graphic that carry meaning. WCAG itself does not recommend requiring AAA for whole sites, because some content cannot meet every AAA criterion.
Nearest passing color
When a pair fails, the checker suggests two fixes: a new text color for the same background, and a new background for the same text. Both keep the hue and saturation and only change the lightness, so a brand orange stays orange, just darker or lighter. Choose the target first: 4.5:1 for normal text, 7:1 for AAA, or 3:1 for large text and UI parts.
Text on a thumbnail or a banner works the same way. Test it against the color right behind the words, then check it at a small size in the YouTube thumbnail preview.
Test a whole palette
The palette grid takes up to 10 colors and tests every pair at once: each row is a text color, each column a background. Every cell shows the text in its real colors with the ratio and the best level it reaches: AAA, AA, AA large (3:1, large text and UI only) or Fail. Paste your brand colors to see which pairs you can use for body text and which only for headings or not at all.
FAQ
What contrast ratio do I need?
For WCAG 2.2 level AA, 4.5:1 for normal text and 3:1 for large text, buttons, form borders and icons. For level AAA, 7:1 for normal text and 4.5:1 for large text.
What counts as large text?
WCAG defines large scale text as at least 18 point, or 14 point bold. On the web, 18 point is 24 CSS pixels and 14 point is about 18.7 CSS pixels.
Why does 4.49 fail when it is almost 4.5?
Because the thresholds are minimums. The checker cuts the ratio to two decimals instead of rounding it, so a pair at 4.499 shows 4.49:1 and fails, as it should.
How is the nearest passing color found?
The checker keeps the hue and saturation of your color and tries every lightness from black to white in steps of 0.1 percent. It keeps the one that reaches the target with the smallest change. When no lightness of that hue reaches the target on your background, it says so.
Does it check transparent colors or text on photos?
No. It compares two solid colors. For text on a photo, test the text color against the lightest and the darkest part of the image behind it.
Related tools
All creator toolsSee if your thumbnail text reads at small sizes.
Check your own screen's colors and gradients first.
Count a post against the 300 character limit.
Maintained by NabeelUpdated Oct 23, 2026.