What is the CSS Gradient Generator?
CSS gradients draw smooth color transitions without image files, so they are sharp on every screen and add no extra downloads. There are three kinds. A linear gradient blends along a straight line at any angle. A radial gradient spreads out from the centre as a circle or ellipse. A conic gradient sweeps around a centre point, which is handy for pie charts and color wheels.
Use this generator to pick colors, drag stop positions and set the angle while watching a live preview. The CSS output includes a solid background fallback color before the gradient line, a good habit for very old browsers and for text-contrast checks. All modern browsers support these gradients without vendor prefixes.
How to use the CSS Gradient Generator
- Choose linear, radial or conic.
- Set the angle (or shape for radial), then pick a color and position for each stop. Add up to six stops.
- Click Random for inspiration, then Copy CSS and paste it into your stylesheet.
Frequently asked questions
Do CSS gradients need -webkit- prefixes?
No. Unprefixed linear-gradient, radial-gradient and conic-gradient work in all current versions of Chrome, Edge, Firefox and Safari.
How do I put a gradient on text?
Apply the gradient as the background, then add background-clip: text; and color: transparent; to the element.
How do I make a hard edge instead of a blend?
Give two neighbouring stops the same position, for example red 50%, blue 50%. The colors then switch instantly at that point.