Skip to content
ENExplore Calculators

Color Contrast

Free Color Contrast calculator with clear step-by-step results.

About Color Contrast

Applies the WCAG contrast formula to two relative luminance values, adding the 0.05 flare constant that models ambient reflection off a screen. The pass threshold then depends on whether the text qualifies as large - 18 pt normal or 14 pt bold - which relaxes the requirement from 4.5:1 to 3:1.

Formulas

Contrast ratio

Ratio = (lighter luminance + 0.05) / (darker luminance + 0.05)

Large text rule

Text counts as large at 18 pt or above, or 14 pt and above when bold

Worked example

With the default values below, Color Contrast returns Contrast ratio of 9.50. Change any input above and every figure here is recalculated in your browser.

Inputs used

Foreground relative luminanceaccepts 0–1
0.05
Background relative luminanceaccepts 0–1
0.9
Text sizeaccepts 6–96 pt
14 pt
Bold weight
No

Results

Contrast ratio
9.50 :1
WCAG verdict
Passes AAA
Ratio required for AA
4.5 :1
Ratio required for AAA
7.0 :1

Step by step

  1. 1Values used
  2. 2Contrast ratio
  3. 3Large text rule
  4. 4Contrast ratio= 9.50 :1
  5. 5WCAG verdict= Passes AAA
  6. 6Ratio required for AA= 4.5 :1
  7. 7Ratio required for AAA= 7.0 :1

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Where do I get relative luminance?

Linearise each sRGB channel, then combine as 0.2126 R + 0.7152 G + 0.0722 B. Browser dev tools and most contrast checkers report it directly.

Why is the maximum ratio 21:1?

Pure white has luminance 1 and pure black 0, so the formula caps at (1 + 0.05) / (0 + 0.05) = 21.

Color Contrast – Calculate Contrast ratio & WCAG verdict