Contrast Checker

Calculate contrast ratio and WCAG AA/AAA compliance.

Check the contrast ratio between a text color and a background color and see whether the pair passes WCAG AA and AAA for normal and large text. Designers and front-end developers use it to confirm that their palette is readable before shipping. A live sample shows the combination in context.

What is WCAG contrast?

The Web Content Accessibility Guidelines define contrast as a ratio between the relative luminance of two colors, from 1:1 (identical) to 21:1 (black on white). Relative luminance weights the linearised red, green and blue channels by 0.2126, 0.7152 and 0.0722 to reflect how bright each looks to the eye. The ratio is (lighter + 0.05) divided by (darker + 0.05). Level AA requires at least 4.5:1 for normal text and 3:1 for large text. Level AAA requires 7:1 for normal text and 4.5:1 for large text. Large text is generally 18pt or 14pt bold and above. Good contrast helps people with low vision and anyone reading in bright light.

How to use Contrast Checker

  1. Enter the text color Type a HEX value in Text color or choose one with the color picker.
  2. Enter the background Do the same in Background color.
  3. Read the ratio The large number shows the ratio, for example 14.63:1, and the table shows Pass or Fail for AA and AAA at normal and large text.
  4. Compare visually Look at the sample box, which uses your colors for large and normal sample text.

Frequently asked questions

What counts as large text?

WCAG treats text of at least 18 point (about 24px) regular or 14 point (about 18.66px) bold as large. These sizes need only 3:1 for AA and 4.5:1 for AAA. The tool shows both columns so you can choose the right one.

Which WCAG formula does it use?

The WCAG 2.x relative luminance and contrast ratio formula, with the 0.03928 linearisation threshold. The ratio is shown rounded to two decimals, while the pass checks use the unrounded value.

Does it support transparent colors?

An 8-digit HEX is parsed, but the alpha channel is ignored in the calculation. Flatten transparent colors against their real background first and test the resulting solid color.

Is 4.5:1 enough?

It is the AA minimum for normal text. Many accessibility teams aim higher, and users with significant vision loss benefit from the 7:1 AAA level.

Does it check non-text elements?

It computes the same ratio for any two colors, so you can test icons or borders against the 3:1 guideline, but the table only labels text thresholds.