Color Contrast Checker

: Check text and background colors against WCAG AA and AAA contrast ratios
Colours
Contrast
Contrast ratio
3.67:1
LevelNeedsResult
AA normal4.5:1✗ Fail
AA large3:1✓ Pass
AAA normal7:1✗ Fail
AAA large4.5:1✗ Fail

Sample

Large text: 24px regular

Normal body text at the default size, set on the background.

  • Large text is 24px regular or 18.66px bold.
Read as hex on hex

Check whether a text colour is readable on a background colour by the WCAG 2 contrast formula. You get the ratio, a pass or fail at each of the four AA and AAA levels, and the same pair rendered as real text.

  1. Enter the foreground in Text and the background in Background, as hex, rgb(), hsl(), oklch() or a CSS name. Each field has a native picker and, in Chrome and Edge, an eyedropper that samples any pixel on screen. Examples loads common pairs.
  2. Read the ratio at the top of the Contrast pane and the AA normal, AA large, AAA normal and AAA large rows below it, each marked Pass or Fail.
  3. Judge the Sample, which draws both colours as opaque text at 24px regular and at the default size.
  4. Press Swap to exchange the two fields, or the pane's Copy all for both colours, the ratio and all four results as tab-separated text.

A mid grey on white, which falls just short of AA for body text and is a common near miss.

Input
text: #777777
background: #ffffff
Output
#777777 on #ffffff: 4.47:1
AA normal   needs 4.5:1  ✗ fail
AA large    needs 3:1    ✓ pass
AAA normal  needs 7:1    ✗ fail
AAA large   needs 4.5:1  ✗ fail

What contrast ratio do I need for WCAG AA?

4.5:1 for body text and 3:1 for large text. AAA raises those to 7:1 and 4.5:1. All four are checked at once here.

Why does this show 4.47:1 where another checker shows 4.48:1?

#777777 on white is about 4.478. Some checkers round it up; this one cuts it to two decimals so the number shown can never look like a pass it did not earn. The pass or fail result does not depend on the display.

What counts as large text?

24px at regular weight, or 18.66px bold. WCAG states these as 18pt and 14pt bold. Anything smaller is held to the normal rows.

Does 3:1 apply to buttons and icons too?

Yes. WCAG 2.1 asks for 3:1 between interface components or meaningful graphics and what sits next to them, which is the same threshold as the AA large row. Put the two colours in and read that row.

Runs entirely in your browser. Nothing is uploaded.