Color contrast checker (WCAG)

Enter both colors as hex (#1f2937) or rgb(31, 41, 55).

Color contrast checker (WCAG)

Result

4.54:1Contrast ratio

AA, normal text (4.5:1)
✓
AA, large text (3:1)
✓
AAA, normal text (7:1)
✕
AAA, large text (4.5:1)
✓
Colors read
#767676 / #ffffff

Color contrast checker (WCAG)

Inputs

Text color
#767676
Background color
#ffffff

How it is calculated

Each color’s relative luminance is computed from its linearized sRGB channels.

Result

Contrast ratio

4.54:1
AA, normal text (4.5:1)
✓
AA, large text (3:1)
✓
AAA, normal text (7:1)
✕

How it is calculated

  1. Each color’s relative luminance is computed from its linearized sRGB channels.
  2. Ratio = (lighter L + 0.05) ÷ (darker L + 0.05), from 1:1 to 21:1.
  3. The ratio is compared with the WCAG 2 thresholds without rounding.

Example

#767676 on white gives 4.54:1: AA for normal text, not AAA.

Good to know

  • Large text is at least 24 px, or 18.66 px bold.
  • Transparency and gradients are not taken into account.

When to use it

  • Check that a text colour stays readable on a button or a banner.
  • Choose brand colours that pass accessibility rules.
  • To make a QR code with readable colours, use the QR code generator.

Frequently asked questions

What ratios do I need?

Level AA asks for 4.5:1 for normal text and 3:1 for large text. Level AAA asks for 7:1 and 4.5:1.

Do icons and buttons count?

Yes. Icons, input borders and focus outlines need at least 3:1 against what is next to them.

Is a text on a photo covered?

The rule still applies, but the contrast changes across the image. Add a solid or dark overlay behind the text to keep it readable.

Updated October 11, 2026

Indicative result. For an important decision, check with a professional.