Color Contrast Checker

Check any foreground and background colour pair for accessibility: the WCAG contrast ratio, AA and AAA pass/fail for normal and large text, and a live preview of the combination.

Developer Tools 100% in your browser
Contrast ratio
15.63 : 1
✓ AA normal (4.5:1)✓ AAA normal (7:1)✓ AA large (3:1)✓ AAA large (4.5:1)

Large text means 18pt+ (24px) or 14pt+ (18.66px) bold. WCAG 2.1 requires AA normal text at 4.5:1 or better.

The quick brown fox jumps over the lazy dog

Large heading preview

Body text on this background — check it stays readable at small sizes too.

How to use

  1. Pick or type the foreground (text) colour.
  2. Pick or type the background colour.
  3. Read the contrast ratio and the AA / AAA results for normal and large text.
  4. Check the live preview to see how the combination actually reads.

Example

Input: Foreground #14243A on background #FFFFFF

Output: Contrast ratio 15.63 : 1 · passes AA and AAA for normal and large text

How it works

Contrast is the ratio of the relative luminance of the lighter colour to the darker one, per the WCAG 2.1 formula. Each colour channel is linearised (values below 0.03928 divide by 12.92, otherwise the ((c + 0.055) ÷ 1.055)^2.4 curve applies), then weighted 0.2126 red, 0.7152 green, 0.0722 blue.

Ratio = (L1 + 0.05) ÷ (L2 + 0.05), where L1 is the lighter colour's relative luminance and L2 the darker. AA needs 4.5:1 for normal text and 3:1 for large text; AAA needs 7:1 and 4.5:1.

Worked example

#14243A on #FFFFFF gives a ratio of 15.63 : 1 — passes AA and AAA for normal and large text.

Edge cases to know

  • Colours must be hex (#rgb or #rrggbb); named colours and other formats are not accepted.
  • Ratios follow the WCAG 2.1 formula; they do not account for font rendering or anti-aliasing.
  • Large text means 18pt+ (24px) or 14pt+ (18.66px) bold.

Limits & compatibility

  • Colours must be hex (#rgb or #rrggbb); named colours and other formats are not accepted.
  • Ratios follow the WCAG 2.1 relative-luminance formula; they do not account for font rendering or anti-aliasing.
  • Large text means 18pt+ (24px) or 14pt+ (18.66px) bold.

Privacy

All checks run locally in your browser. Colours are never sent to a server or stored.

Related tools

FAQ

Questions about Color Contrast Checker

What is a good contrast ratio?

WCAG 2.1 requires at least 4.5:1 for normal text (AA) and 3:1 for large text. AAA needs 7:1 for normal text and 4.5:1 for large text. Black on white is the maximum, 21:1.

What counts as large text?

18pt or larger (24px), or 14pt or larger (18.66px) in bold. Large text needs less contrast, which is why the AA threshold drops to 3:1.

Which colours can I enter?

Hex colours only — #rgb or #rrggbb, for example #14243A. Named colours and other formats are not accepted; use the colour picker if you are unsure of the hex value.

Does passing mean my design is accessible?

It means the colour pair meets the WCAG contrast rule — one part of accessibility. Font size, spacing, focus states and non-colour cues matter too.