A CSS linear gradient is written as background: linear-gradient(direction, color, color). This tool builds that line for you: pick a direction, choose two or three colors, check the live preview, and copy the rule into your stylesheet.
How to use
1. Set the directionType any valid CSS direction such as 90deg, 135deg or to bottom. The default 90deg runs left to right.
2. Pick the colorsChoose the left and right colors. Tick Use middle color to add a third stop between them.
3. Copy the CSSCheck the preview, then copy the background declaration and paste it into your CSS, Tailwind arbitrary value or design tokens.
Hero and banner backgrounds without exporting an image
Buttons, cards and badges with a subtle brand gradient
Quickly testing color pairs before adding them to a design system
Generating a gradient line to paste into CSS, SCSS or a style attribute
Edge cases
Only linear gradients are generated. Radial and conic gradients are not supported.
Colors come from the browser color picker, so they are opaque hex values; there is no alpha channel or stop position.
The direction field is used as typed. An invalid value such as 90 (without deg) makes the browser ignore the whole declaration, and the preview stays empty.
Stops are spread evenly. Add your own percentages by hand if you need uneven stops.
It is the first argument of linear-gradient(). Angles such as 90deg run left to right and 180deg runs top to bottom; keywords such as to right or to bottom-right also work.
Can I use more than three colors?
Not in the tool itself. Copy the generated rule and add extra stops by hand, for example linear-gradient(90deg, #0ea5e9, #22c55e, #eab308, #f97316).
Is the CSS compatible with all browsers?
Unprefixed linear-gradient() is supported by every current browser, so no -webkit- prefix is needed.
Is my data uploaded?
No. The gradient is built locally in your browser and nothing is sent to a server.