Skip to content

CSS gradient generator

Pick 2–5 colors, choose the type and angle, and copy CSS that blends smoothly in modern color spaces.

Colors
The gradient as 7 colors

Runs entirely in your browser. Your files and colors never leave your device.

How to use the gradient generator

  1. Pick two to five colors. Add or remove stops with the buttons.
  2. Choose linear, radial or conic, and set the angle.
  3. Choose how colors mix: OKLCH (vivid), OKLab (smooth) or sRGB (classic).
  4. Copy the CSS. It includes a fallback for older browsers, plus the gradient as a stepped palette.

How it works

Classic CSS gradients mix colors in sRGB, which often passes through a dull gray (try blue to yellow). CSS Color 4 lets browsers mix in OKLCH or OKLab instead. This tool writes that modern syntax and also a fallback made of pre-computed sRGB stops, sampled from the same OKLCH curve, so older browsers show almost the same gradient.

Try it with popular colors

Ready-made palettes for Procreate

Prefer a finished palette? Browse every color for free, then download the swatch files.

Instant download: Procreate .swatches, Adobe .ase, GIMP/Krita .gpl, CSS/Tailwind and a printable PDF guide. Checkout by Payhip.

Related tools