Skip to content

Color Contrast Checker

Large text — 18pt regular / 14pt bold

Normal body text. The quick brown fox jumps over the lazy dog. 1234567890.

16.50:1

Excellent

WCAG levelThresholdResult
AA · normal text≥ 4.5:1Pass
AA · large text≥ 3:1Pass
AAA · normal text≥ 7:1Pass
AAA · large text≥ 4.5:1Pass
UI components / graphics≥ 3:1Pass

Large text = 18pt regular or 14pt bold and above. UI threshold (WCAG 1.4.11) applies to interactive controls and meaningful graphics, not body text.

Estimates for educational purposes — not financial, medical, or legal advice. See terms.

The WCAG contrast ratio tells you whether the gap between your text color and its background is enough for users with low vision, color blindness, glare, or just an aging display. It’s the simplest accessibility check you can run, and one of the most consequential — failing it makes the page unreadable for a meaningful slice of users, including the elderly demographic that grows every year.

How the ratio is computed

WCAG 2.1’s formula is two short steps:

  1. Convert each sRGB color to relative luminance — a single number from 0 (black) to 1 (white) that approximates how bright the human eye perceives it. The formula weights green heaviest (0.7152), then red (0.2126), then blue (0.0722).
  2. Compute the ratio: (L_lighter + 0.05) / (L_darker + 0.05). The +0.05 anchors the ratio so identical colors return 1, not zero, and keeps the range bounded at 21:1 (pure white on pure black).

The constants come from BT.709 (the colour primaries baked into sRGB and HDTV). The +0.05 anchors come from a flare-resistance model — they roughly account for ambient-light reflection off a typical screen.

Example: black on white

#000000 on #ffffff returns 21:1 — the maximum possible contrast in sRGB. Passes everything (AA / AAA / UI). This is the gold standard but rarely the right design choice — full-black text on full-white background is harsh on the eyes for long reading. Aim for high-contrast-but-not-pure pairs like #1a1a1a on #fafafa (still 18:1) for body copy.

Example: classic Material grey on white

#999999 on #ffffff returns 2.85:1 — fails AA normal (needs 4.5), fails AA large (needs 3.0), fails UI (needs 3.0). Yet many design systems use light greys for “secondary text” or placeholder text. They are unreadable for older users and color-deficient users. Bumping to #666666 lifts the ratio to 5.74:1 and clears AA normal — the smallest defensible step for placeholder text. If you want to tune a grey by eye and preview the hex, use the hex/RGB/HSL converter.

Example: brand color on brand color

A common pattern: brand orange #ff6600 on white. Ratio: 3.94:1. Passes AA large but not AA normal. Fine for big call-to-action buttons; not fine for body links inside paragraphs. Compositors who care about brand purity often nudge their accent slightly darker (e.g. #cc5200 for body-link contexts, ratio 5.59:1, AA normal pass) and reserve the lighter brand for hero / display use.

What about color blindness?

Contrast ratio does not test for color blindness — two colors with great contrast can still confuse a deuteranope (red-green color blindness) if the only difference is hue. Use the contrast checker to confirm legibility, then verify color-as-information separately with the color blindness simulator and never rely on color alone for status / state.

When the ratio “looks wrong”

The reported ratio assumes:

  • Both colors are fully opaque sRGB (no transparency).
  • The display is roughly sRGB-calibrated (most modern displays approximate this).
  • Ambient lighting is moderate (not glare-heavy).

In practice, the reported ratio is what every accessibility tool, every browser devtools, and every WCAG audit will report. If your designer’s eye disagrees with the number, trust the number — the designer is calibrating for their own ideal viewing condition, not for the long tail of your users.

What this tool does not do

It doesn’t simulate color blindness — contrast ratio and color vision deficiency are separate checks, covered above.

It doesn’t handle alpha. Pre-composite your translucent colors against the actual backdrop, then test the resulting opaque RGB.

It doesn’t suggest accessible alternatives. If a pair fails, you have to nudge the colors yourself — though the live preview makes the iteration tight.

It doesn’t enforce 1.4.11 graphical / focus-indicator rules beyond reporting whether a color pair clears the 3:1 bar. The 1.4.11 success criterion has additional context-of-use rules (e.g. focus indicators need 3:1 against adjacent state, not just background) that need a holistic accessibility review.

Frequently asked questions

What's the difference between AA and AAA?

AA is the WCAG level most legal accessibility frameworks (ADA in the US, EAA in the EU, WCAG 2.1 in most public-sector procurement) require. It demands 4.5:1 contrast for normal text and 3:1 for large text. AAA is enhanced contrast, demanding 7:1 normal / 4.5:1 large. AAA is rarely required by law, but is the bar for content where readability matters most — clinical interfaces, government forms, dense tabular data, low-vision-priority products. Aim for AA on everything; aim for AAA on body text where you can without breaking your visual identity.

Why is the threshold lower for large text?

Larger characters are easier to read at lower contrast — letterforms are bigger relative to fixation noise, so the visual system has more data per glyph. WCAG defines large text as 18pt regular or 14pt bold and above; in CSS that's roughly 24px regular or 18.66px bold. The 3:1 threshold for large text matches the contrast that's still legible to the lower-vision range Section 508 was originally calibrated against. Don't confuse 'large' with 'big' — heading styles in the 16-22px range are still 'normal text' for grading purposes.

What does the 1.4.11 UI components threshold mean?

WCAG 2.1 added a 3:1 minimum for graphical objects and interactive UI elements — button outlines, form input borders, focus indicators, icons that convey meaning. It's separate from text contrast: an icon-only button needs its outline (vs background) to hit 3:1 even if no text is involved. This is the threshold most design systems quietly fail — light-grey input borders and 1px focus rings on light backgrounds are the usual culprits. The tool's UI row tells you whether the same color pair would pass for a non-text graphical use.

Does this account for transparency?

No. WCAG contrast assumes opaque colors. If your text color is rgba(0,0,0,0.7) over a white card on a coloured page background, the 'effective' text color depends on how the alpha composites — and that depends on whether anything sits behind the card too. Compute the post-blend RGB yourself (alpha-compositing math) before testing. For typical use (opaque hex pair), the reported ratio is exactly what a browser will render.

Why is grey-on-grey marked as fail when it 'looks fine'?

Personal vision varies enormously: 8% of men have some form of color-deficient vision, and roughly 1 in 12 adults wears corrective lenses. The WCAG thresholds aren't a 'perfect-vision-on-a-calibrated-monitor' standard — they're the floor that keeps the long tail of users (older eyes, glare, low-contrast displays) able to read. Trust the number over the apparent comfort: if AA fails, someone in your audience will struggle even if you don't.