Color Contrast Checker

Your input stays in your browser and is never sent.

Calculate the contrast ratio between a text color and a background color and check it against WCAG 2.x AA and AAA for normal text, large text and UI components.

  1. Enter
  2. See the result
Text color
Background color

Enter colors as HEX (#475569), rgb(), hsl() or a color name.

Normal textTypical body text size
AA 4.5:1 PassAAA 7:1 Pass
Large text24px or larger, or bold 18.66px or larger
AA 3:1 PassAAA 4.5:1 Pass
UI components & graphicsButton borders, icons and the like
AA 3:1 Pass

The quick brown fox jumps over the lazy dog.

Large text sample

What is the color contrast checker?

The color contrast checker calculates the contrast ratio between a text color and a background color. It judges whether the pair meets AA and AAA of WCAG 2.x, the international web accessibility standard, for normal text, large text and UI components.

The ratio runs from 1:1 (the same color) to 21:1 (black on white). The higher the number, the easier the text is to read, including for people with low vision and on a screen in bright sunlight.

Use it when choosing a site's colors or reviewing a design. No sign-up or login, and it's free.

How to use the color contrast checker

  1. Enter the text colorPick a color, or type it as HEX, rgb(), hsl() or a color name.
  2. Enter the background colorEnter the background the same way. The swap button reverses the two.
  3. Check the resultThe contrast ratio and the AA and AAA results appear right away.

Features of SOKUFU's color contrast checker

Three kinds judged at once
See the results for normal text, large text and UI components in one table.
Never rounds a near miss into a pass
A value such as 4.499 is not rounded up to 4.5; the ratio is cut off after two decimals. A color shown as passing really meets the standard.
A live sample
Body text and large text are shown in your colors so you can judge readability by eye.
Many ways to write a color
Enter HEX, rgb(), hsl() or a basic color name.
Runs in your browser
Nothing you enter is ever sent to a server.
Works on phones
The layout adapts to your screen, so it works on phones and tablets too.

The contrast ratio standards (WCAG 2.x)

For normal text the standard is 4.5:1 or more for AA and 7:1 or more for AAA. Large text is relaxed to 3:1 or more for AA and 4.5:1 or more for AAA.

Large text means text of 24px (18pt) or more, or bold text of 18.66px (14pt) or more. Non-text parts such as button borders and icons need 3:1 or more at AA, and there is no AAA standard for them.

The ratio is the lighter color's relative luminance plus 0.05, divided by the darker color's relative luminance plus 0.05.

Related tools to use with the color contrast checker

Color contrast checker FAQ

What value counts as a pass?

For normal text, 4.5:1 or more for AA and 7:1 or more for AAA. For large text, 3:1 or more for AA and 4.5:1 or more for AAA.

What counts as large text?

Text of 24px (18pt) or more, or bold text of 18.66px (14pt) or more.

Can I use colors with transparency?

The color is read, but transparency is ignored and the color is treated as opaque. The effect of overlapping colors isn't reflected.

Why is there no AAA for UI components?

WCAG 2.x only sets a 3:1 AA standard for non-text parts and defines no AAA level for them.

Are the colors I check sent to a server?

No. The contrast ratio and the pass/fail results are worked out in your browser. The text and background colors you enter are not sent anywhere.