CSS Gradient Generator

Build a linear, radial or conic gradient with as many color stops as you like, then copy the CSS. Start from a preset or hit Random.

Color stops
CSS

        
Presets

How to use the gradient generator

  1. Pick a type: linear (a straight band of color), radial (from the center outwards) or conic (around the center, like a color wheel).
  2. Set the angle for linear and conic gradients. 0° points up, 90° points right.
  3. Change the color and position of each stop. Add stops for richer blends; you need at least two.
  4. Copy the CSS and paste it into your stylesheet.

Short of ideas? Click one of the Presets or press Random, then fine-tune it. ⇄ Reverse flips the order of the colors.

Browser support

Linear and radial gradients work in every modern browser. Conic gradients work in all current versions of Chrome, Edge, Firefox and Safari. The generated code also includes a plain background color first, so very old browsers still show something sensible.

Tips for good-looking gradients

Where gradients work well

FAQ

Can I use a gradient as a text color?

Yes: use the gradient as background, then add background-clip: text; and color: transparent; on the text element.

How do I make a hard edge instead of a blend?

Give two neighbouring stops the same position, for example red at 50% and blue at 50%.

Why do I see stripes in my gradient?

This is called banding. It appears when two very similar colors are stretched over a large area. Use slightly more different colors, or add a stop in the middle, to make the steps less visible.