DevGrill

CSS Gradient Generator

Design linear, radial and conic CSS gradients visually and copy the CSS.

Runs in your browser

Presets:
CSS
background: #f59e0b;
background: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #e11d48 100%);
°
Color stops
%
%
%
%
%
%

CSS gradients in short

A CSS gradient is an image the browser draws from colors, so it needs no file, scales to any size and can be changed in code. linear-gradient blends along a line at an angle, radial-gradient spreads out from a center, and conic-gradient sweeps around a center like a color wheel or pie chart.

Pick a type, move the angle or center, and set up to eight color stops with their own position and opacity. The preview updates as you go, and the CSS comes with a solid fallback color first. Colors with transparency are written in modern rgb() syntax, which every current browser supports.

How to use the CSS Gradient Generator

  1. Start from a preset or the default. Presets cover common looks: warm, cool, a radial glow, a color wheel and a fade to transparent.

  2. Choose the type. Linear (with an angle), radial (circle or ellipse) or conic, and move the center if you like.

  3. Edit the color stops. Set each stop's color, position and opacity. Add stops, or remove them down to two.

  4. Copy the CSS. Paste it into your stylesheet; it's a background declaration.

Tips

  • Two stops at the same position make a hard line instead of a blend, useful for stripes. Combine with Repeating for patterns.
  • A gradient from a transparent color to a dark one makes a readable overlay for text on photos.
  • Gradients between very different hues can look muddy in the middle. Adding a stop with an in-between color fixes it.

Frequently asked questions

Which browsers support these gradients?

Linear and radial gradients work in every browser in use today. Conic gradients and the space-separated rgb() syntax work in all current versions of Chrome, Edge, Firefox and Safari.

What does the first background line do?

It's a solid color for browsers that can't draw the gradient. Browsers that can, use the second line instead.

Can I use a gradient for text?

Yes: set the gradient as background, then add background-clip: text and color: transparent to the text element.

Can I share a gradient?

Yes. The Share button makes a link that opens this exact gradient.

Related tools