PageKit/Color Contrast Checker

Color Contrast Checker

Calculate WCAG contrast ratio for two opaque sRGB hex colors.

CONTRASTBROWSER UTILITY / LOCAL

OUTPUT

Your result will appear below after you run the tool.

METHOD & NOTES

How color contrast checker works

Calculate WCAG contrast ratio for two opaque sRGB hex colors.

Formula and convention

Convert sRGB to relative luminance. Contrast = (lighter luminance + 0.05) / (darker luminance + 0.05).

A worked example

The example dark green on white exceeds the 4.5:1 AA normal-text threshold.

Scope and precision

Three- or six-digit opaque hex only. AA normal text needs 4.5:1; AA large text 3:1; AAA normal text 7:1. This is not a full accessibility audit.

Displayed results may be rounded. Inputs are processed locally and are not stored by this site. Keep the original values if you need to reproduce the result.

Why might another tool give a different result?

Compare unit definitions, rounding, period assumptions, and input values. This page states the convention used by this calculator.