CSS gradient generator
What is a Css Gradient Generator?
CSS gradients create smooth transitions between colours without image files, so they load instantly and scale perfectly. This generator supports all three gradient types and gives you precise control over colour stops, positions and angles, with a live preview and ready-to-paste CSS.
How to use it
- Choose linear, radial or conic.
- Add, remove and move colour stops, and pick their colours.
- Set the angle for linear and conic gradients, or the shape and position for radial ones.
- Copy the
backgrounddeclaration.
The three types
- Linear: colours change along a straight line.
linear-gradient(90deg, #06B6D4, #3B82F6)goes left to right. - Radial: colours spread from a centre point.
radial-gradient(circle at center, #FDE68A, #F59E0B). - Conic: colours rotate around a centre, like a colour wheel or pie chart.
conic-gradient(#EF4444 0 25%, #22C55E 0 60%, #3B82F6 0)draws a three-segment pie.
Colour stops
Each stop can have a position: linear-gradient(#000 0%, #000 50%, #fff 50%) creates a hard edge at the middle because two stops share the same position. This is how stripes and progress bars are drawn with pure CSS. Use repeating-linear-gradient for patterns.
Tips
- Angles: 0deg points up, 90deg points right, 180deg points down.
- Use
in oklchinterpolation in modern browsers, as inlinear-gradient(in oklch, blue, yellow), to avoid dull grey midpoints. - Layer several gradients separated by commas for mesh-like backgrounds.
Frequently Asked Questions
What is a conic gradient?
A gradient whose colours rotate around a centre point, useful for pie charts, colour wheels and spinners.
How do I make a hard colour edge in a gradient?
Give two consecutive colour stops the same position, for example red 50 percent and blue 50 percent.
Which direction is 0deg in a linear gradient?
0deg points to the top, so colours flow from bottom to top. 90deg flows from left to right.
Can I stack multiple gradients?
Yes. List them in the background property separated by commas. The first one is drawn on top.