Build linear, radial and conic CSS gradients with any number of colour stops, watch them update live, and copy CSS that is valid as written.
Stops are sorted by position before the gradient is written, so moving one past another does what it looks like it does.
.gradient {
background-image: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
}CSS Gradient Generator runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
A gradient is one of the few bits of CSS where the syntax is simple and getting the result you pictured is not. The angle is measured from the top going clockwise, which is not how most people guess; a radial gradient's size keyword changes the result more than its position does; and a conic gradient's seam lands wherever the start angle puts it. Seeing it while you change it is the only reliable way through that.
Every stop here carries an explicit position, because stops without positions are spaced evenly and that is almost never what a design wants. Two stops at the same position make a hard edge, which is how you build a stripe or a split background out of a gradient rather than two elements.
The output is CSS that is valid as written. Values that mean nothing are left out rather than printed as zeroes, so you are not pasting in `0deg` and wondering later whether it was deliberate. The preview is drawn with a style object rather than a stylesheet, so nothing it produces can escape into the rest of the page.
Gradients are interpolated in sRGB here, which is what the unprefixed syntax does in every browser today. That is worth knowing because an sRGB blend between two saturated colours can pass through a dull middle — the classic blue-to-yellow going through grey. If you hit that, adding a mid stop in the colour you want is the fix, and it is why the stop list has no fixed length.
Up. CSS gradient angles are measured from the top edge and increase clockwise, so 0deg runs bottom to top and 90deg runs left to right. That is different from the maths convention and from the old prefixed syntax, which is why gradients so often come out rotated.
Put two stops at the same position. The colour changes with no transition at that point, so a stripe is a pair of stops repeated, and a split background is two stops at 50%.
Because the blend happens in sRGB, where the midpoint between two saturated complements is a desaturated grey. Add a stop in the middle with the colour you actually want there — that is the practical fix, and it is why the stop list is not limited to two.
No. Unprefixed linear, radial and conic gradients have been supported by every current browser for years, and shipping prefixes now means shipping dead bytes.
No. The gradient is built and previewed entirely in your browser, and nothing you type is sent anywhere.