Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

Color contrast checker, WCAG AA and AAA.

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 

AANormal text, 4.5:1
AALarge text, 3:1
AAANormal text, 7:1
AAALarge text, 4.5:1
UIControls and icons, 3:1

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

Light against dark, measured.

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.

02 / No rounding up

4.49 is not 4.5

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

Same hue, new lightness

Suggested colours change only the lightness, in the OKLCH colour space, so a brand blue stays blue.

Guide

How to check colour contrast, and fix a pair that fails.

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.

How to use the color contrast checker

  1. Type the Text colour, or click the swatch next to it to pick one. Hex like #1a1a1a, rgb(26 26 26), hsl() and names like navy all work.
  2. Do the same for the Background. Click the swap button to flip them. In Chrome and Edge, Pick text colour from screen and Pick background from screen let you click any pixel on your screen, such as a live website.
  3. Read the ratio and the five Pass or Fail boxes: AA and AAA for normal and large text, and UI for controls and icons.
  4. Check the preview below to see large text, a paragraph, a button, a text field and an icon in your colours. Under See it as, pick protanopia, deuteranopia, tritanopia or no colour vision to see the preview and the palette grid that way. The ratio and the Pass or Fail boxes always use the real colours, as WCAG does.
  5. If the pair fails, click one of the suggested colours to use it. The ratio updates straight away.
  6. To test a palette, type up to 10 colours under Check a palette, one per line, and read the grid. Copy link copies an address with the pair in it, and the last pair and palette are kept in this browser.

What the ratios mean

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.

RatioWhat passesExample on white
Below 3:1Nothing. Too faint for text or for controls.#999999, 2.84:1
3:1 to 4.49:1Large text, buttons, field borders and icons (AA)#ff0000, 3.99:1
4.5:1 to 6.99:1All text at AA, and large text at AAA#767676, 4.54:1
7:1 and upEvery 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.

How the contrast ratio is worked out

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.

How to fix a colour pair that fails

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:

  • Darken the text before you touch the background. Body text has more room to change without anyone noticing.
  • Keep two versions of a brand colour. A bright one for big headings and shapes, and a deeper one for small text and links.
  • White on a coloured button. Check it with white as the text. White on #7c52ff is 4.65:1, so it passes AA for button labels.
  • Mind the opposite pairing. The same purple behind near black text, #111111, gives 4.05:1, which only passes for large text. A lighter button colour would suit dark text better.

What to check beyond body text

  • Hover, focus and pressed states. Each state is its own pair of colours. A link that passes at rest can fail when its hover colour is paler.
  • Placeholder text and hints. These are often the palest grey on the page. They are still text people need to read.
  • Field borders and focus rings. These fall under Non-text Contrast, so they need 3:1 against what is next to them.
  • Dark mode. Run every pair again with the dark theme colours. A grey that passes on white often fails on near black.
  • See-through colours. A colour with transparency is checked as it looks on the background, so you get the ratio people actually see.
  • Text on photos or gradients. The ratio changes across the picture. Pick the lightest spot behind light text, or the darkest behind dark text, and check that colour.

Checking a whole palette

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

Good to know.

What contrast ratio do I need?

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.

What counts as 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.

Does contrast matter for logos?

No. WCAG does not ask for any contrast on logos or brand names, or on text in a control that is switched off.

Can I check colours with transparency?

Yes. A see-through colour is checked as it looks on the background, and a see-through background as it looks on white.

Is #767676 on white enough?

Yes, just: it is 4.54:1, which passes AA for normal text. One step lighter, #777777, is 4.47:1 and fails.

Do links need a contrast ratio against the text around them?

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.

Is AA or AAA the one I should aim for?

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.

Does a larger font size let me use lighter text?

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.

Why does my colour pass on white but fail in dark mode?

Contrast is always between two colours, so changing the background changes the ratio. Check each theme as its own pair.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch