Free Color Contrast & Luminance Checker Online

Calculate WCAG text contrast and relative luminance for two opaque hex colors.

Preparing your local workspace…
METHOD, EXAMPLES & ANSWERS

How to use Color Contrast & Luminance Checker

Calculate WCAG text contrast and relative luminance for two opaque hex colors.

About Color Contrast & Luminance Checker

Color contrast is a ratio derived from the relative luminance of foreground and background colors. It is useful when designing readable text and evaluating color combinations. Relative luminance is a normalized linear-light measurement; it is not an average of the three RGB components.

Enter two opaque sRGB hex colors. The checker provides a visual sample, both luminance values and the AA/AAA normal and large text thresholds. It does not account for transparency, gradients, images, font rendering or every other accessibility requirement. Passing a ratio alone does not certify a website.

  1. Enter two opaque sRGB hex colors.
  2. Select or enter the labeled options, then run locally.
  3. Review the result, limitations and worked example before copying or exporting.

How it works

Linearize each sRGB channel, calculate weighted luminance, then divide (lighter luminance + 0.05) by (darker luminance + 0.05).

A quick example

Black has luminance 0 and white has luminance 1; the contrast ratio is 21:1.

Assumptions, edge cases & limits

  • Enter two opaque sRGB hex colors. The checker provides a visual sample, both luminance values and the AA/AAA normal and large text thresholds. It does not account for transparency, gradients, images, font rendering or every other accessibility requirement. Passing a ratio alone does not certify a website.
  • This workspace does not save inputs. Use synthetic or redacted data and verify output before production use.

Questions about Color Contrast & Luminance Checker

How do I calculate WCAG text contrast for two colors?

Enter foreground and background colors and compare the contrast ratio with the applicable text-size threshold. This checks the chosen pair, not full-page accessibility.

What is the maximum ratio?

For opaque sRGB black and white it is 21:1.

What is WCAG AA normal text contrast?

The checker uses the 4.5:1 threshold for normal text and 3:1 for large text.

Does it check transparent colors?

No. Enter opaque #RGB or #RRGGBB colors.

Does passing mean my website is accessible?

No. Contrast is only one accessibility requirement.

For processing, privacy and service availability, see our privacy details and methodology. Tool-specific questions and limitations are explained above.

A result or explanation needs correcting? Tell us the tool name and an example.