Skip to content

A CSS value from the fields

Check the contrast of two colors

The ratio uses the WCAG relative luminance of the two opaque colors.

4.5:1 is the usual AA bar for normal text. 3:1 is the bar for large text.

The work stays in this tab.

This tool runs in your browser. Turn on JavaScript to use it.

Contrast

The sample is fixed. It uses the same rule as the form.

First
#ffffff
Second
#000000
Ratio
21.00:1
Normal text AA
Passes
Large text AA
Passes

How to use it

  1. 1Fill in the fields.
  2. 2Read the result.
  3. 3Copy the line you need.

Good to know

  • Alpha is ignored. Put the color on white yourself before measuring if it is translucent.
  • This page does not upload the text.
  • Text longer than one hundred thousand characters is rejected.

Questions

Does the result leave this browser?

No. The calculation finishes in the current tab.

What does this page leave out?

Alpha is ignored. Put the color on white yourself before measuring if it is translucent.

What if the input is huge?

Past one hundred thousand characters, the page stops and asks you to shorten it.

Related tools