Color Contrast Checker Check text and background colors against WCAG

You can enter 3, 4, 6 or 8 hex digits, with or without #. Transparency is allowed for text only.

Contrast ratio
UseAAAAA
Normal text
Large text
UI components and graphicsNot defined

Large text means at least 24px, or at least 18.66px and bold (18pt, or 14pt bold).

A larger text sample

This is how normal text looks in these colors.

The heading is 24px. The paragraph and button text are 16px. The preview keeps your chosen colors in either theme.

Find a passing color

Suggestions keep the hue and saturation and change only lightness. Text transparency stays the same. The closest suggestion has the smallest lightness change among the darker and lighter options.

Copy the page address to share the current valid pair. Your colors are included in the link.

The comparison runs in your browser. Your color values are not uploaded by this tool.

What is a good color contrast ratio?

WCAG AA asks for at least 4.5:1 for normal text and 3:1 for large text. The ratio describes a difference in relative luminance, from 1:1 for identical luminance to 21:1 for black against white. It accounts for how much red, green and blue contribute to brightness, rather than simply comparing their hex numbers. W3C explains the thresholds in its text contrast guidance.

A result just below a threshold fails, even when rounding would appear to reach it. This tool cuts the displayed ratio to two decimal places and uses the full calculation to decide Pass or Fail. Text with transparency is first blended over your solid background. A photograph, gradient or layered background needs checks at the actual locations behind the text.

Color contrast AA vs AAA

AAA sets a higher target: 7:1 for normal text and 4.5:1 for large text. Bold alone does not make small text large. Read the size rule under the results and check the font size you actually use. W3C’s enhanced contrast guidance explains the AAA text requirements.

Important visual parts of controls and graphics use an AA threshold of 3:1 against adjacent colors, under non-text contrast guidance. That rule does not define an AAA ratio. The words on a button still need the appropriate text contrast. Passing a color-pair check does not establish that an entire page meets WCAG.

How to check color contrast in Chrome

You can inspect text and its color in Chrome DevTools, then compare the text color with the background behind it. If the background includes an image, transparency or several layers, make sure you are checking the final colors rather than just a single declared color.

Here, enter both colors and read the appropriate row. If a pair fails, choose Adjust text or Adjust background, then press Use this beside a suggestion. Some pairs cannot reach a target by changing only one side. When that happens, try changing the other color or reducing transparency. Keep the text size and the purpose of the element in mind.

Color contrast questions

How is the contrast ratio calculated?

The checker converts the final red, green and blue values into linear light, then computes relative luminance as 0.2126R + 0.7152G + 0.0722B. The ratio is (lighter luminance + 0.05) divided by (darker luminance + 0.05). Transparent text is blended before that calculation.

Does bold text count as large text?

Only at the required size. WCAG treats text at least 14pt and bold, approximately 18.66px, as large. Text without that bold weight needs to be at least 18pt, or 24px. A smaller bold label still follows the normal-text threshold.

What text color goes with blue or yellow?

Enter the actual background color, then choose Adjust text. Read the ratio and try a passing suggestion. A color name covers many shades, so the exact pair matters more than a general rule about blue or yellow.

Why does my brand color fail?

A color can be distinctive yet have too little luminance difference from its background. Try a darker or lighter version using the suggestions, change the background or choose another text color. Do not rely on a color name or its appearance alone.

Why does my background color need to be solid?

A transparent background needs another color behind it before its final appearance is known. Choose that final solid background here. Text transparency can be measured because the chosen background supplies the color underneath it.