About the CSS Gradient Generator
The CSS Gradient Generator builds linear, radial and conic gradients with as many color stops as you like and shows them in a large preview while you adjust. When it looks right, copy a complete background declaration, or copy a link that reopens the same gradient.
How it works
The tool writes a CSS gradient function from your settings. Linear gradients use an angle (0deg runs bottom to top, 90deg left to right), radial gradients use a circle or ellipse shape and a center position, and conic gradients sweep colors around a center point starting from the chosen angle. Each color stop has a position from 0% to 100%, and stops are listed in order of position.
Ticking Repeating switches to repeating-linear-gradient (or the radial and conic versions), which tiles the pattern once the last stop is reached, useful for stripes. The copied CSS includes a solid background color first as a fallback, then the gradient.
How to use
- 1
Pick Linear, Radial or Conic, or start from a preset or the Random button.
- 2
Set each color stop's color and drag its position; use Add stop for more colors.
- 3
Adjust the angle, or the shape and center for radial and conic gradients.
- 4
Click Copy to copy the CSS and paste it into your stylesheet.
Worked examples
Default left-to-right blend
A blue-to-purple banner background.
Diagonal fade
A card that fades from top-left to bottom-right.
Radial spotlight
A soft glow behind a hero headline.
White fills the center and fades out to dark navy at the edges.
Frequently asked questions
What's the difference between a linear and radial gradient?+
A linear gradient transitions colors along a straight line at a chosen angle. A radial gradient spreads outward from a center point as a circle or ellipse, and a conic gradient sweeps around the center like a clock hand.
Can I add more than two colors to a gradient?+
Yes. Click Add stop for as many colors as you like and drag each one's position.
Which direction does 0deg point?+
0deg runs from bottom to top. 90deg runs left to right, 180deg top to bottom, and 270deg right to left.
Do I need vendor prefixes like -webkit-?+
No. All current browsers support the standard linear-gradient() and radial-gradient() syntax that this tool outputs.
Can I use the gradient on text or borders?+
The output is a background value. You can reuse the gradient function itself with background-clip: text for text, or with border-image for borders, by editing the copied CSS.