CSS Gradient Generator

Create linear and radial CSS gradients with contrast checks.

🔒 Client · Offline
Processed locally
This tool runs in the browser. Contrast is sampled at each color stop and the average stop color, not across every rendered gradient pixel.
Paste a linear-gradient() or a radial-gradient() value. The tool reads the stops and the angle.
135°

Color stops

Drag a marker to move the stop.

  • 0%
  • 100%
Sample text on gradient

CSS

background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);

Text contrast, sampled at stops and average

worst 2.43:1

AA Fail AAA Fail

Each row is one sample. The tool measures the text color against each stop color and against the average stop color. It does not measure every pixel between two stops.

  • Stop 1#7c3aed · 5.70:1
  • Stop 2#06b6d4 · 2.43:1
  • Average#4178e1 · 4.20:1

About CSS gradients

This tool builds linear and radial CSS gradients from color stops.

Use the angle control for linear gradients. Drag a stop marker on the gradient bar, or use the position slider. Set Alpha to make a stop transparent.

Paste a CSS gradient to load its stops and its angle. The tool reads one gradient layer. It does not read conic or repeating gradients.

Turn on "in oklch" to interpolate in the OKLCH color space. The browser then mixes the stops with an even perceived lightness, so the middle of the gradient does not go gray.

Contrast is sampled at each explicit color stop and their average color. It estimates readability at those points, but does not test every interpolated point across the rendered gradient canvas.

This tool does not store your input.