What it does
The CSS gradient generator lets you design a gradient by eye and copy the finished CSS. Pick a linear, radial or conic gradient, add as many color stops as you like, drag their positions, set the angle or center point, and the preview updates instantly. You can also paste an existing linear-gradient(…), radial-gradient(…) or conic-gradient(…) to edit it visually. Everything runs in your browser.
How to use
- Start from a preset or keep the sample gradient.
- Choose the Type. Linear and conic gradients have an angle; radial and conic gradients have a center you can move with Center X and Center Y.
- Edit the Color stops: change a color with the picker or type any CSS color, drag Position to move it, use + Add stop to insert one in the widest gap, and Reverse to flip the order.
- Turn on Repeating to tile the gradient for stripes and rings.
- Copy the code from the CSS card, optionally with a solid color fallback for very old browsers.
The Gradient CSS box at the bottom shows the gradient value and is editable: paste a gradient from your stylesheet or a design tool and the controls pick it up.
Example
.hero {
background-color: #667eea;
background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
Tips for good gradients
- Keep it subtle. Two neighboring hues (blue to violet, orange to pink) look smoother than opposite colors, which can turn muddy grey in the middle.
- Add a middle stop to control the blend. A third stop slightly lighter than its neighbors gives a soft highlight.
- Hard stops make shapes. Stops at the same position create sharp edges: stripes, flags, progress bars and pie charts all use this trick.
- Directions.
to rightequals 90deg andto bottom(the default) equals 180deg. Angles go clockwise from the top. - Text on gradients must stay readable across the whole gradient. Check the lightest and darkest stops against your text color with a contrast checker.
FAQ
› What is the difference between linear, radial and conic gradients?
A linear gradient blends colors along a straight line at an angle. A radial gradient spreads out from a center point as a circle or ellipse. A conic gradient sweeps around a center point like the hands of a clock, which makes it good for color wheels and pie charts.
› How do I make hard color stripes instead of a smooth blend?
Give two neighboring stops the same position, for example red 50% and blue 50%. The color then changes instantly at that point. Turn on Repeating to tile the pattern, which is how CSS stripes are made.
› Can I use transparent colors?
Yes. Type any CSS color into a stop, including rgba(), hsl() with alpha, 8-digit hex or transparent. The color picker keeps the alpha you set, and the preview shows a checkerboard behind transparent areas.
› Do I still need vendor prefixes or a fallback?
No prefixes are needed: every current browser supports unprefixed linear, radial and conic gradients. The optional solid color fallback only matters for very old browsers or for tools that read background-color, such as some email clients.