CSS Gradients in Practice: Linear, Radial and Angles
How linear and radial gradients work, how angles and colour stops behave, and when a gradient is the right tool.
Gradients are one line of CSS but fiddly to tune by hand: two colours, a direction and sometimes a third stop. This generator previews the result and writes the rule for you.
Choose linear or radial, set the angle and colours, then copy the CSS and paste it into your stylesheet. The preview updates as you type.
Runs locally in your browser — nothing is uploaded.
A linear gradient runs along a straight line at the given angle; a radial gradient spreads outward from a centre point.
Yes — add a middle stop if you want a three-colour blend, then adjust its colour.
The syntax shown works in every current browser. Extremely old browsers need prefixed fallbacks.
The browser draws gradients as images, so a gradient costs nothing to download but can be expensive to paint on very large areas. Two or three colour stops are cheap; a dozen stops over a full-screen scrolling section can cost frames on weaker phones.
Colour choice matters more than the angle. A gradient between two close hues reads as depth; a gradient between opposing hues reads as a design decision that competes with the content. Test the text contrast at both ends before shipping.