Skip to main content
CalculazaEveryday calculations, made easier.

FREE ONLINE COLOR AND DESIGN TOOLS

Color Contrast Checker

Estimate WCAG contrast ratio between two colors.

INPUTS

Enter the details

Add the information requested below to get your result.

Your entries are used to produce the result in this browser.

How to use this tool

What does the Color Contrast Checker do?

Estimate WCAG contrast ratio between two colors. Enter the details above to see the result. The notes below explain the calculation method, any published formula, a worked example and important limitations.

When to use this tool

Estimate WCAG contrast ratio between two colors. Have Foreground HEX and Background HEX ready before you start. Preview the colour where it will actually appear, and check contrast if it sits behind text.

How to use the Color Contrast Checker

  1. Enter the requested information: Foreground HEX, Background HEX.
  2. Check each value, date, text entry, or unit before continuing.
  3. Tap the main button to see your result.
  4. Review the result and use Copy result when you need to reuse it.
  5. Choose Clear to remove the entries and start again.

Formula and calculation method

Both colors are converted to relative luminance. Their contrast ratio is then calculated using the WCAG relative-luminance formula.

This tool may use a processing rule, conversion factor, validation step or generation method rather than one standalone equation. The method above describes how its output is produced.

Color Contrast Checker worked example

Example inputs: Foreground HEX: #111111; Background HEX: #ffffff. Example output: Contrast ratio: 18.88:1 WCAG AA normal text: Pass WCAG AA large text: Pass

Inputs required

  • Foreground HEX
  • Background HEX

Accuracy and limitations

Color calculations are based on digital color values. Real-world appearance can vary by display, brightness, color profile, and print process. Results are generated by the method built into this tool. Rounding, input format, unit selection, and assumptions can affect the output. For important decisions, verify the result independently with an appropriate trusted source.

Part of Contrast and Accessibility.

Sources and further reading

These external references support the standards, concepts or browser methods related to this tool. The exact assumptions used by this calculator are described above.

Frequently asked questions

What do I need to enter?

Start with Foreground HEX, Background HEX. Follow the field labels and keep units and formats consistent.

How is the result worked out?

The colour values are interpreted or converted using the selected colour notation or colour-space relationship. You supply Foreground HEX, Background HEX. Screens and print processes can display the same colour differently.

What should I double-check?

Preview the colour in its intended design and check contrast wherever text needs to be readable.