Colour Contrast Checker (WCAG)

Check any two colours against WCAG 2.2 AA and AAA contrast requirements, with a live preview of real text at real sizes.

Large heading preview

This is normal body text at your chosen colours. If it feels like hard work to read here, it will be worse on a phone in sunlight.

Small print and captions sit at this size.

WCAG 2.2 results

  • AA — normal text (needs 4.5:1)Pass
  • AA — large text (needs 3:1)Pass
  • AA — UI & graphics (needs 3:1)Pass
  • AAA — normal text (needs 7:1)Fail
  • AAA — large text (needs 4.5:1)Pass

Your contrast ratio

4.54:1

Good — passes AA

Text colour
#767676
Background
#FFFFFF
AA normal text
Pass
AAA normal text
Fail

How it works

Colour contrast is the difference in perceived brightness between text and the surface behind it. Get it right and your interface is comfortable for everyone, including the one in twelve men with a colour vision deficiency and the growing number of us reading on a phone in bright daylight. Get it wrong and content becomes genuinely unusable.

How it works

  • Each colour channel is converted from sRGB to linear light, then weighted for how sensitive the eye is to it — green counts most, blue least.
  • Luminance = 0.2126·R + 0.7152·G + 0.0722·B
  • Ratio = (lighter + 0.05) ÷ (darker + 0.05)

Because the maths is based on luminance rather than hue, swapping the text and background colours never changes the ratio — though it can change how comfortable the pairing feels.

A worked example

Mid-grey #767676 on white gives 4.54:1 — the lightest grey that passes AA for body text, which is why it appears in so many design systems. Lighten it one step to #808080 and it drops to 3.95:1 and fails. That's how narrow the margin is at the pale end of the scale.

How to interpret your result

  • Below 3:1 — fails everything. Not usable for text or interface elements.
  • 3:1 to 4.5:1 — acceptable for large headings, icons and borders only.
  • 4.5:1 to 7:1 — passes AA for all text. The practical target for most projects.
  • 7:1 and above — passes AAA. Worth aiming for on long-form reading and public services.

Common real-world uses

  • Checking a brand palette before it's locked into a design system.
  • Fixing accessibility audit failures and WCAG conformance reports.
  • Choosing readable text colours for buttons, banners and badges.
  • Validating dark mode as carefully as light mode.
  • Meeting public-sector and enterprise procurement requirements.

Related tools: HEX / RGB / HSL Colour Converter · Text Case Converter · JSON Formatter & Validator · URL Encoder / Decoder

Frequently asked