WCAG Color Contrast Checker

Check the contrast between your text and its background.

Your colors

rgb(119, 119, 119)

rgb(255, 255, 255)

Use HEX, RGB, HSL or a CSS color name, without transparency.

Text preview

Skip preview

Normal text · 16 px

This is how your text will look.

Large text · 32 px

A little contrast matters.

Large text: at least 18 pt regular or 14 pt bold.

4.48:1

Text contrast ratio

Below AA for normal text.

AA · Normal text

4.5:1 required

Fail

AA · Large text

3:1 required

Pass

AAA · Normal text

7:1 required

Fail

AAA · Large text

4.5:1 required

Fail

Pass or fail uses the unrounded ratio.

WCAG 2.2 · SC 1.4.3 and 1.4.6 · Opaque sRGB text pairs

Large text: at least 18 pt regular or 14 pt bold.

View calculation

Foreground luminance: 0.184474994500441. Background luminance: 1. Ratio = (lighter + 0.05) / (darker + 0.05) = 4.478089453577214. Thresholds use this unrounded value.

Open in palette builder →

Supported color inputs and errors →

Check a text and background pair

Enter the text color as the foreground and the color directly behind it as the background. Use the preview to see the pair as a paragraph, heading or label.

How to check contrast

  • Enter a supported color in each field or use the color picker. Check the normalized hex values to confirm the pair.
  • Read the ratio and choose the AA or AAA result for your text size.
  • Use Swap colors to try the reverse arrangement. The ratio stays the same.
  • Adjust the preview size and weight to match your design, then copy or share the pair.

Why the sample fails AA for normal text

The starting pair, #777777 on #FFFFFF, has a ratio of 4.48:1. It falls below the 4.5:1 needed for AA normal text, but passes AA large text at 3:1. It fails both AAA categories. Changing the preview size does not change the ratio.

Choose black or white text

If the background is fixed, compare black and white text on it. The tool shows which of those two has the higher ratio. Check the result for your text size before choosing a label color.

Sources and further reading