Menu

Gradient Contrast Checker

Test text readability against any CSS gradient — linear or radial. Get WCAG AA/AAA pass/fail results at every point along the gradient.

PREVIEW

Readable text sample
Worst contrast
—
across gradient
Average
—
mean contrast
AA (4.5:1)
—
pass rate
AAA (7:1)
—
pass rate
1:1 (low) 7:1 (AAA) 21:1 (max)

Marker shows the worst-case contrast point across the gradient.

Analyze your gradient Edit the controls to see live contrast results.
—
Stop Color Ratio AA AAA
— — — — —
CSS GRADIENT
background: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899);

Gradient Type

Direction

Gradient Stops

Presets

Text

✓ Copied!
WCAG • GRADIENTS • ACCESSIBILITY

Gradient Contrast Checker

Check text readability against CSS gradients. Unlike flat-color contrast checkers, this tool samples the entire gradient to find the worst-case contrast ratio — so you know your text is readable at every point, not just at the color stops.

WCAG AAWCAG AAALINEARRADIALLIVE
Live CheckUpdates as you edit
12 Sample PointsFull gradient coverage
WCAG AA + AAABoth standards
Worst CaseFinds the weakest point
01
FUNDAMENTALS

What Is a Gradient Contrast Checker?

A Gradient Contrast Checker measures how readable text is when placed on top of a CSS gradient. Standard contrast checkers only compare two solid colors. But gradients change color continuously — so text might be readable at one end and unreadable at the other.

This tool samples the gradient at multiple positions between its color stops, calculates the WCAG contrast ratio for each sample, and reports:

  • Worst-case contrast — the lowest ratio anywhere on the gradient.
  • Average contrast — the mean across all samples.
  • AA pass rate — % of samples that meet WCAG AA (4.5:1 normal, 3:1 large).
  • AAA pass rate — % of samples that meet WCAG AAA (7:1 normal, 4.5:1 large).
Simple idea: A flat color is one contrast number. A gradient is a range — and the worst point in that range determines whether your text is truly readable.
02
WCAG STANDARDS

WCAG Contrast Requirements

AA NORMAL

4.5:1 minimum

Body text under 18pt (or under 14pt bold) requires a contrast ratio of at least 4.5:1.

4.5:1
AA LARGE

3:1 minimum

Large text — 18pt+ or 14pt+ bold — requires at least 3:1 contrast against its background.

3:1
AAA NORMAL

7:1 minimum

AAA-level body text should reach 7:1 contrast for the strongest readability guarantee.

7:1
AAA LARGE

4.5:1 minimum

Large text at AAA level requires 4.5:1 contrast against its background.

4.5:1

For the official WCAG contrast requirements, see the WCAG 2.1 contrast minimum.

03
HOW IT WORKS

Sampling the Gradient

The tool renders your CSS gradient, samples the color at 12 evenly-spaced positions along its length (from 0% to 100%), and computes the WCAG contrast ratio between each sampled color and your text color.

01RenderDraw the gradient
02SampleRead 12 pixel colors
03CalculateWCAG ratio for each
04ReportWorst, average, pass rate

Because the gradient is sampled from actual rendered pixels, the result accounts for every subtlety — interpolated colors between stops, radial falloff, and mixed-stop positions.

WCAG CONTRAST FORMULAMATHEMATICS
L = 0.2126·R + 0.7152·G + 0.0722·B
   (with R, G, B linearized from sRGB)

Contrast = (L_light + 0.05) / (L_dark + 0.05)

Where L_light is the lighter of the two
and L_dark is the darker.
04
USE CASES

When You Need a Gradient Contrast Checker

Hero Sections

Text over gradient backgrounds must be readable at every point.

Gradient Buttons

CTA buttons often have gradient fills with white labels.

Cards & Badges

Gradient card headers with text overlays.

Gradient Charts

Ensure data labels remain readable across chart gradients.

Dark & Light Themes

Test gradient contrast in both themes.

Brand Refresh

Verify new brand gradients meet accessibility standards.

05
BEST PRACTICES

Tips for Accessible Gradients

  • Check the worst point. The minimum contrast anywhere on the gradient is what matters.
  • Prefer subtle gradients. Light-to-light gradients keep contrast consistent.
  • Add a scrim. A semi-transparent overlay can lift contrast.
  • Use text shadows sparingly. They help but don't fix accessibility.
  • Test large and small text. Different WCAG thresholds apply.
  • Verify in dark mode. Gradients can look different in both themes.
08
FAQ

Gradient Contrast Checker FAQ

How does the gradient contrast checker work?

It renders your CSS gradient to a canvas, samples 12 evenly-spaced points along the gradient, and calculates the WCAG contrast ratio between each sampled color and your text color.

What is a gradient contrast checker vs a color contrast checker?

A color contrast checker compares two solid colors. A gradient contrast checker samples many points along a gradient and reports the worst case — because a gradient's contrast varies at every position.

What are the WCAG contrast requirements?

For normal text: AA needs 4.5:1, AAA needs 7:1. For large text (18pt+ or 14pt+ bold): AA needs 3:1, AAA needs 4.5:1.

Can I check radial gradients?

Yes. The tool supports both linear and radial gradients, and samples colors across the visible range in both cases.

Why does the "worst case" matter?

Text must be readable everywhere it appears. A gradient that passes at 90% of its length but fails at one edge still creates a real accessibility failure for users reading at that edge.

Does the tool check actual rendered pixels?

Yes. The gradient is rendered to a hidden canvas, and the color at each sample position is read directly from the canvas pixels — so interpolated colors between stops are accounted for accurately.

Can I check multiple text colors at once?

You test one text color at a time, but changing the text color updates results instantly so you can compare options quickly.

Is my data sent anywhere?

No. All processing happens locally in your browser. Nothing is uploaded.

Is the tool free?

Yes. The Gradient Contrast Checker is completely free.

CHECK • FIX • SHIP

Make Every Gradient Readable

Gradients are beautiful — but only if the text on top of them is readable. This tool gives you the numbers you need to design gradients that pass WCAG AA and AAA at every point.

GradientsWCAG AAWCAG AAAAccessibilityContrastCSS