01 / Ratio
From 1:1 to 21:1
Each colour's relative luminance comes from its red, green and blue, weighted as the eye sees them. The ratio is the lighter one plus 0.05 over the darker one plus 0.05.
Free tool
Type or pick a text colour and a background to see the contrast ratio and whether it passes WCAG 2.2: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1, and buttons, fields and icons need 3:1. When a pair fails, you get the closest colours that pass, with the same hue. Paste a whole palette to check every pair at once, see the colours as people with colour blindness do, pick colours from anywhere on screen in Chrome and Edge, and copy a link to the pair.
Need a custom tool, app or website? Contact us →See-through colours are checked as they look on the background (and the background on white).
Large text, 24 px
Normal text at 16 px. The quick brown fox jumps over the lazy dog, and this is how a paragraph reads in these colours.
ButtonText field
Check a palette
The WCAG 2.2 levels
Contrast (Minimum) 1.4.3, level AA: 4.5:1, or 3:1 for large text.
Contrast (Enhanced) 1.4.6, level AAA: 7:1, or 4.5:1 for large text.
Non-text Contrast 1.4.11, level AA: 3:1 for controls, focus rings and the parts of icons and charts you need.
Large text is at least 18 point (about 24 px), or 14 point (about 18.66 px) when bold. Read on w3.org (WCAG 2.2, W3C Recommendation, 12 December 2024), checked 18 October 2026.
Colours are checked in your browser. Nothing is uploaded.
How the ratio works
01 / Ratio
Each colour's relative luminance comes from its red, green and blue, weighted as the eye sees them. The ratio is the lighter one plus 0.05 over the darker one plus 0.05.
02 / No rounding up
WCAG treats the thresholds as exact, so the ratio here is cut, not rounded: a pair that shows 4.49:1 fails AA.
03 / Fixes
Suggested colours change only the lightness, in the OKLCH colour space, so a brand blue stays blue.
Guide
A color contrast checker measures how far apart two colours are in lightness and gives the answer as a ratio, from 1:1 for two identical colours to 21:1 for black on white. That ratio decides whether text is readable for people with low vision, and WCAG sets the pass marks. This checker tests a text colour against a background for every WCAG 2.2 level at once, suggests the closest colours that pass, and can check a whole palette in a grid.
#1a1a1a, rgb(26 26 26), hsl() and names like navy all work.The checker shows the levels side by side because they answer different questions. AA is the level most accessibility policies and audits ask for. AAA is stricter and is worth aiming for in long reading text, like articles and documentation.
| Ratio | What passes | Example on white |
|---|---|---|
| Below 3:1 | Nothing. Too faint for text or for controls. | #999999, 2.84:1 |
| 3:1 to 4.49:1 | Large text, buttons, field borders and icons (AA) | #ff0000, 3.99:1 |
| 4.5:1 to 6.99:1 | All text at AA, and large text at AAA | #767676, 4.54:1 |
| 7:1 and up | Every level, including AAA for small text | #595959, 7.00:1 |
Pure red on white is a good warning. It looks strong, but it only reaches 3.99:1, so red error text in a normal size fails AA. A deeper red fixes that.
Each colour first gets a relative luminance between 0 (black) and 1 (white). Green counts most, then red, then blue, because that is how bright each looks to the eye. The ratio is the lighter luminance plus 0.05, divided by the darker one plus 0.05.
A worked example: #767676 has a luminance of about 0.181, and white is 1. So the ratio is (1 + 0.05) divided by (0.181 + 0.05), which is 1.05 divided by 0.231, about 4.54. That clears 4.5, so it passes AA for normal text. The checker cuts the result instead of rounding it, so a pair at 4.499 shows 4.49:1 and fails, as WCAG intends.
When a pair misses 4.5:1, or misses 7:1 after passing AA, the checker lists up to four colours that reach the next target. It tries the text and the background, each darker and lighter, and changes only the lightness in the OKLCH colour space. That means a brand blue stays the same blue, only deeper or paler. The closest options come first, and a fix that would flip a colour from light to dark is only offered when nothing closer works.
A few habits that help:
#7c52ff is 4.65:1, so it passes AA for button labels.#111111, gives 4.05:1, which only passes for large text. A lighter button colour would suit dark text better.The palette grid shows every colour as text on every other colour, with the ratio and the best level each pair reaches: AAA, AA, Large or Fail. It is the quick way to build a design system, because you can see at a glance which pairs are safe for body text and which are only for headings or decoration. You can also share a single pair: the page address updates with both hex codes, so copying the link brings the same check back up.
To see how your palette looks to people with colour blindness, try the color blindness simulator. To convert a colour between hex and RGB, use hex to RGB.
Questions
For WCAG AA, 4.5:1 for normal text and 3:1 for large text, buttons and icons. For AAA, 7:1 for normal text and 4.5:1 for large text.
WCAG says at least 18 point, or 14 point bold. On the web that is about 24 px, or 18.66 px bold.
No. WCAG does not ask for any contrast on logos or brand names, or on text in a control that is switched off.
Yes. A see-through colour is checked as it looks on the background, and a see-through background as it looks on white.
Yes, just: it is 4.54:1, which passes AA for normal text. One step lighter, #777777, is 4.47:1 and fails.
If colour is the only thing that marks a link, people who cannot tell the colours apart may miss it. An underline is the simple fix, and the link colour still needs 4.5:1 against the background.
AA is the usual target for websites and apps. Aim for AAA in long reading text if your colours allow it, since higher contrast is easier for everyone to read.
Yes. Text of at least 24 px, or 18.66 px when bold, only needs 3:1 at AA. Below that size, normal text needs 4.5:1.
Contrast is always between two colours, so changing the background changes the ratio. Check each theme as its own pair.