Skip to content
SUMILORASUMILORA

Colour contrast checker

Developer tools

Enter two colours. The ratio and every WCAG threshold are shown.

Runs in your browser

Nothing is uploaded. The work happens on your own device, so your file or text never reaches us.

About this tool

What the thresholds mean

  • 4.5:1 — AA for normal text. The level most legislation and procurement requires.
  • 3:1 — AA for large text, and the minimum for interface components: icons, form borders, focus rings, chart lines.
  • 7:1 — AAA for normal text.
  • 4.5:1 — AAA for large text.

"Large" means at least 18.66px bold or 24px regular. The 3:1 component rule is the one most often missed: a pale grey form border on white fails it, and a user who cannot see where the field is cannot fill it in.

What the ratio cannot tell you

It is a formula on relative luminance, so it has blind spots.

It treats all hues alike, and it is known to be unreliable for some pairings — light text on a mid-saturated background can pass numerically while being hard to read. WCAG 3 proposes APCA, which models perception better, but AA at 4.5:1 is still what the law asks for today.

It also ignores transparency: a semi-transparent colour has to be composited over its real background before the ratio means anything. And it says nothing about font weight, letter spacing or the quality of the typeface at small sizes, all of which affect whether text is legible.

Questions

What contrast ratio do I need?

4.5:1 for normal text, 3:1 for large text and for interface components like borders and icons. 7:1 for AAA.

Does grey text on white pass?

It depends on the grey. #767676 on white is 4.54:1 and just passes AA; #777777 is 4.48:1 and just fails. There is no margin at that boundary.

What about transparency?

The ratio ignores alpha. Work out the composited colour over its real background first, then check that.

Related tools