ficklestudio26

Home › Blog

Color Contrast Ratios Explained

ficklestudio26 · Facts checked October 25, 2026

Light gray text on white looks elegant and is hard to read. The Web Content Accessibility Guidelines put numbers on it.

The Color Palette Generator Check your colors
Enter two colors and see their contrast ratio.
Open the tool →

The requirement

Success Criterion 1.4.3 in WCAG 2.1, at level AA, requires a contrast ratio between text and its background of at least 4.5:1 for normal text. For large text the ratio is 3:1. Large text means 18 point or larger, or 14 point and bold, which is roughly 24 px or 18.5 px. The ratios are not rounded, so a computed 4.499:1 does not pass.

The exceptions

The stricter level

A higher level, AAA (criterion 1.4.6), asks for 7:1 for normal text.

Using it with a palette

When you build a palette, the text and background colors matter more than the other colors. Test the pairs you will really use, and darken the text or lighten the background until the ratio passes. Pale colors on white are the most common failures.

How the ratio is calculated

The ratio compares the relative luminance of the lighter color (L1) with that of the darker color (L2): (L1 + 0.05) ÷ (L2 + 0.05). Luminance is a weighted sum of the red, green and blue channels, with green counting most: L = 0.2126 R + 0.7152 G + 0.0722 B. Before weighting, each channel (0 to 255) is divided by 255 and then converted from its screen encoding to a linear value. Ratios run from 1:1 (no difference at all) to 21:1 (black on white).

Worked examples (our own arithmetic)

Buttons, icons and form borders

WCAG also has a separate criterion for non-text parts of an interface, 1.4.11 Non-text Contrast. It asks for at least 3:1 for the graphics and controls a person needs to see to use a page, such as a form field border or an icon with no label. Disabled controls are exempt.

Practical checks

The Color Palette Generator Check your colors
Enter two colors and see their contrast ratio.
Open the tool →

Sources

Checked on October 25, 2026. We summarize in our own words and only state what these sources support.

More from the blog