CSS GRADIENT

CSS gradient generator, what you see is what you get.

Linear, radial and conic gradients with live multi-stop preview. Copy the CSS or export a PNG — everything runs locally in your browser.

Type & angle

90°

Color stops

0%
100%

CSS code

Most tools process data locally; see this page for details

How do I use the gradient generator?

Pick a gradient type (linear, radial or conic) and an angle, then add and drag color stops to tune colors and positions with a live preview. When happy, click “Copy CSS” to paste the code into your project, or “Export PNG” to get a ready-to-use gradient image. Presets like Aurora and Sunset apply with one click.

FAQ

How do I choose between linear, radial and conic?

Linear fades along one direction and is the most common choice for backgrounds and buttons. Radial fades outward from a centre, good for glows and circular highlights. Conic sweeps around an angle, used for rainbow rings and swirl effects. Nearly all everyday UI backgrounds are linear.

How do I add and adjust the colour stops?

Click Add colour stop under the gradient bar to create one, then drag the round handle to move it. Clicking a stop lets you change its colour, and double-clicking removes it. Each stop carries a position percentage, and CSS lets you omit positions so the browser distributes them evenly.

Can I leave the percentages out of the generated CSS?

Yes. When stops sit at even positions such as 0%, 50% and 100%, CSS allows colours only: linear-gradient(red, blue, green). When positions are uneven you must write them out, otherwise the rendered gradient will not match the preview.

示例与注意事项Example & notes

一个例子A worked example

调好角度与两端色标,实时预览并复制 background-image 代码;也能导出 1200×630 的 PNG 当分享图。Set the angle and colour stops, preview live, copy the background-image code, or export a 1200×630 PNG for social cards.

注意事项Things to watch

相关问答More Q&A

支持锥形渐变吗?Is conic gradient supported?

支持线性、径向与锥形三种渐变类型切换。Yes — linear, radial and conic are all available.

能直接复制代码吗?Can I copy the code?

可以,代码块右上角有复制按钮,复制的是可直接使用的 CSS。Yes — the copy button gives ready-to-use CSS.

Further reading

觉得好用?Found it useful?