130 · Design & Web

CSS Gradient Generator

Pick colours and an angle, see the gradient live, and copy the CSS.

CSS Gradient Generator

Type
#4f46e5
#ec4899
#f59e0b

How to use the css gradient generator

  1. Choose linear, radial or conic.
  2. Pick two or three colours and set the angle.
  3. Copy the CSS into your stylesheet.

Gradient types

  • Linear blends along a straight line at the angle you choose.
  • Radial spreads out from the centre as a circle or ellipse.
  • Conic sweeps around the centre like a colour wheel.

The first line of the CSS is a plain background colour for very old browsers.

Examples

Indigo to pink at 135°

background: linear-gradient(135deg, #4f46e5, #ec4899);

Radial circle

background: radial-gradient(circle, …);

Questions

Do gradients work in every browser?

Linear and radial gradients work in every current browser. Conic gradients work in all current major browsers too.