DexTools

Colour Contrast Checker

Check the contrast ratio between text and background colours against the WCAG AA and AAA thresholds, with a live preview.

Nothing leaves your browser Dex Media & Design

Colours

Contrast

Large heading text

Body copy at the normal size, which is where the 4.5:1 threshold applies.

17.74:1Passes AA for body text
Normal text — AA (4.5:1)
Pass
Normal text — AAA (7:1)
Pass
Large text — AA (3:1)
Pass
Large text — AAA (4.5:1)
Pass
Save to DriveInsert into Office

Saving needs a Dex account. The tool never does.

How it works

  • Enter a text colour and a background colour. The ratio is calculated with the WCAG 2.1 relative luminance formula and shown against the four thresholds that matter.
  • AA asks for 4.5:1 on normal text and 3:1 on large text. AAA asks for 7:1 and 4.5:1. Each row says pass or fail for the pair you entered.
  • The preview renders real heading and body text in your colours, so the ratio is not the only thing you judge: some passing pairs still read badly.
  • The calculation is local arithmetic. Nothing is uploaded, which means an unreleased brand palette stays private.

Examples

Checking a button before shipping it

Paste the button background and its label colour. If the ratio fails AA for normal text, the label needs to change before the component does.

Auditing a brand grey

A mid grey that looks fine on a designer monitor can sit at 3.1:1. The grade rows show which text sizes it is allowed on.

Frequently asked questions

What counts as large text?

WCAG treats 18pt (24px) regular or 14pt (18.66px) bold as large. Large text has lower thresholds because the strokes are thicker.

Why does my pair fail AA at 4.4:1?

The threshold is 4.5:1 and it is not rounded: 4.4 fails. Nudging the background a shade darker usually clears it.

Does this check non-text contrast?

No. WCAG also requires 3:1 for UI components and graphical objects; this tool covers text, which is where most failures are found.

Which formula is used?

The WCAG 2.1 relative luminance formula with the sRGB gamma correction, the same calculation browsers and audit tools use.