CSS Gradient Generator: Linear, Radial, Conic

Use this css gradient generator to build smooth backgrounds. Pick linear, radial or conic, add and drag color stops, set the angle, and see it live. Copy the CSS or try a preset to get started fast.

CSS Gradient Generator

Visual gradient maker with CSS code.

%
%
%
Everything runs in your browser. Nothing you enter or upload is sent to a server.

How to use the CSS Gradient Generator

  1. Choose a gradient type.
  2. Pick the colors and their stop positions (0-100%).
  3. Drag the angle slider.
  4. Copy the CSS into your stylesheet.

How it works

The tool builds a standard CSS gradient function: linear-gradient(angle, color stop, ...), radial-gradient(shape at center, ...) or conic-gradient(from angle, ...). A solid background color comes first as a fallback for very old browsers.

Example

linear-gradient(90deg, #e5322d 0%, #ffb199 100%) fades from red on the left to peach on the right.

Frequently asked questions

Do CSS gradients work in all browsers?

Yes, all modern browsers support linear, radial and conic gradients.

Can I use a gradient for text?

Yes, with background-clip: text and a transparent text color.

Are gradients better than images?

They load instantly, scale perfectly and are tiny compared with image files.

See also: Color Picker.

Build a gradient

How to use it

  1. Pick a gradient type.
  2. Add color stops.
  3. Set the angle or shape.
  4. Copy the CSS.

More questions

How many colors can I use?

You can use as many color stops as you like in your gradient.

Can I make text gradients?

Yes. Use background-clip text to fill your text with a gradient.

Is there a preset list?

Yes. Start from a preset and change it.

Related tools: CSS Box Shadow Generator, HEX to RGB Converter, Color Palette Generator.

A 45-degree red to blue gradient

Pick linear, radial or conic, set the angle, choose your colors and their positions, then copy the CSS. To check that text stays readable on your gradient colors, use the Color Contrast Checker.

Worked example: red (#ff0000) at 0% and blue (#0000ff) at 100% with a 45-degree angle gives background: linear-gradient(45deg, #ff0000 0%, #0000ff 100%);, with a plain red background line above it as a fallback.

More answers

What does the first background line do?

It is a solid fallback color, here #ff0000, for browsers that cannot read the gradient. Modern browsers use the second line.

How do I add a middle color without it disappearing?

Colors are written in order, so give color 2 a lower position than color 3, for example 0%, 50% and 100%. Red, green and blue then give linear-gradient(90deg, #ff0000 0%, #00ff00 50%, #0000ff 100%).