Color Contrast Checker (WCAG)

Check the contrast between a text color and its background against WCAG 2.1: fine for body text (AA, 4.5:1), comfortable (AAA, 7:1), or large text only (3:1). A sample sentence painted in both colors shows how it really reads.

Color conversion

HEX
—
RGB
—
HSL
—

Contrast ratio (WCAG)

This is how text looks in that pair

—

Color palettes

About this tool

How to use it

  1. 1 Enter the text and background colors as #HEX or rgb().
  2. 2 The contrast ratio appears, with an AA/AAA verdict underneath.
  3. 3 Nudge the colors while watching the sample until it passes.

Good to know

  • The page audit reads HTML you paste — use the Link checker to follow a link
  • YAML support covers the widely used syntax only
  • JWT decoding unpacks the contents; it does not verify the signature

Frequently asked questions

Is large text judged differently?

Yes. Text at 18pt (about 24px) or 14pt bold and above passes AA at 3:1. Body-size text needs 4.5:1.

Does this apply to icons and buttons?

Graphical elements like icons and input borders need 3:1 against their background.

How is the ratio calculated?

From the relative luminance of each color: (lighter + 0.05) ÷ (darker + 0.05), exactly as WCAG defines it.

Esc