Color Contrast Checker

Calculate WCAG contrast ratio for two opaque sRGB colors.

Your workspace

Processed in your browser

Enter your values or try the example.

This utility calculates the contrast ratio between two colors to help you ensure your designs meet Web Content Accessibility Guidelines (WCAG). It helps you decide if your text will be readable against a specific background.

How to check contrast

  1. Input the HEX code for your text color and the HEX code for your background color.
  2. Review the generated contrast ratio and the pass/fail status for standard and large text accessibility levels.

Understanding accessibility standards

The tool evaluates contrast against WCAG AA (4.5:1 ratio for normal text) and AAA (7:1 ratio) standards. A higher ratio indicates better readability. If a combination fails, consider adjusting the lightness or saturation of your colors to improve the contrast.

Check a standard pair

Text #000000, Background #ffffff

21:1 ratio (Passes all)

Questions about contrast checking

What does the contrast ratio number mean?

The ratio represents the difference in luminance between the two colors. A ratio of 1:1 means no contrast, while 21:1 is the maximum possible contrast (black on white).

Why does my color combination fail?

A failure usually means the colors are too similar in brightness. To fix this, you can darken the text color or lighten the background color to increase the luminance difference.

Continue your workflow

Explore more tools in this category for your next step.