Loading Techie Utils…

CSS Gradient Generator

Build linear, radial and conic CSS gradients. Free, and runs entirely in your browser — nothing you enter is uploaded, stored or sent to a server.

About Gradient Generator

Linear, radial and conic CSS gradients with two or three stops and the exact declaration ready to copy — including a solid background-color first, which is what anything that cannot paint the gradient falls back to. The preview shows the result at full width, which is where banding and muddy midpoints actually reveal themselves.

The controls follow the type, because the three gradients are steered by different things. Linear takes a direction — the eight keywords, or an angle of your own. Radial takes a shape, a size keyword deciding where the last colour lands, and a centre chosen from the nine box positions or given as lengths. Conic takes the angle it starts from and the point it spins around. Any of them can be made repeating, and stop positions can be given per colour.

The optional middle stop is what separates a good gradient from a grey one. Interpolating directly between two distant hues passes through desaturated territory; placing a deliberate stop in between keeps the transition vivid.

Where it helps

  • Three gradient types with a live full-width preview.
  • Produces standard CSS with no vendor prefixes needed.
  • A middle stop avoids the desaturated midpoint of a two-colour blend.
  • Angle and radial position are adjustable rather than fixed.

Limits

  • Gradients are interpolated in sRGB, so some hue pairs pass through a dull middle regardless of the stops.
  • Wide, subtle gradients band visibly on 8-bit displays; noise or a dithered overlay is the usual remedy.
  • Text over a gradient has varying contrast, which the Contrast Checker cannot score in one pass.
  • Conic gradients are well supported now but still worth testing on older browsers you must serve.

Frequently asked questions

Why does my gradient look muddy in the middle?

sRGB interpolation passes through a desaturated region between distant hues. Add a middle stop, or pick hues that are closer together.

What causes the visible bands?

Limited colour depth over a large area. A subtle noise overlay, or a slightly steeper gradient, hides it.

Which angle does CSS use?

0deg points upward and angles increase clockwise, so 90deg runs left to right and 180deg runs top to bottom.

Can I animate a gradient?

Not the stops directly in most browsers. Animate background-position on an oversized gradient, or transition between layered backgrounds.

Related tools

More Colors & Design tools