CSS Gradient Generator

Hand-writing a gradient means editing CSS, saving, and refreshing until the angle looks right. This generator gives you a live preview: set the type, angle, and colour stops, watch it update, then copy production-ready CSS with no vendor prefixes needed for any current browser.

How to use it

  1. Choose a linear or radial gradient.
  2. Set the angle or radial shape.
  3. Add colour stops and drag their positions.
  4. Copy the generated CSS straight into your stylesheet.

Frequently asked questions

How do gradient angles work in CSS?

0deg points upward and angles increase clockwise, so 90deg runs left to right and 180deg runs top to bottom. This differs from the mathematical convention, which catches people out.

Why does my gradient look muddy in the middle?

Because interpolating in sRGB passes through a desaturated midpoint, most obviously between complementary colours. Adding an intermediate stop, or using an oklch interpolation hint in modern browsers, fixes it.

Do I still need vendor prefixes?

No. Unprefixed linear-gradient and radial-gradient have been supported by every current browser for many years. Prefixes only add weight.

Can a gradient be animated?

Not the gradient itself in a simple transition, since background-image does not interpolate. The usual trick is to animate background-position on an oversized gradient, or use CSS custom properties registered with @property.

All free tools · Blog · About · Contact

Also available in: Español · Português · Français · Deutsch