How to use the CSS Gradient Generator tool
- Select a gradient typeLinear fades in one direction, radial glows outward from a point, and conic sweeps round a centre like a colour wheel or pie chart.
- Set the coloursChoose each colour with the picker or a HEX value and slide it into place; add, delete or flip stops whenever you like.
- Refine itChange the angle, the radial shape and its centre, or make the pattern repeat for stripes.
- ExportCopy the full CSS, just the value or a share link, or download the gradient as a PNG.
Gradient generator features
- Every gradient typelinear-gradient, radial-gradient and conic-gradient, plus repeating variants for stripes and patterns.
- Unlimited stopsUse as many colours as the design calls for, each positioned precisely by percentage.
- Built-in fallbackThe generated CSS opens with a plain background colour for ancient browsers and email apps.
- Presets and shuffleA dozen ready-made gradients and a random button when you need inspiration.
- Image and link exportSave a Full HD picture for slides or wallpapers, or share a link that reopens your exact gradient.
How CSS gradients work
A CSS gradient is an image the browser paints on the fly, so it stays crisp at any size and adds nothing to download. You can use one anywhere an image is accepted, usually in background or background-image:
.banner {
background: #0ea5e9;
background: linear-gradient(120deg, #0ea5e9 0%, #22c55e 100%);
}
The first declaration is a safety net for very old browsers, and modern ones apply the second. Current Chrome, Edge, Firefox and Safari all support linear, radial and conic gradients with no vendor prefixes.
What the gradient angle means
- 0deg runs from bottom to top, the same as
to top. - 90deg runs from left to right, equivalent to
to right. - 180deg runs from top to bottom, the default, equivalent to
to bottom. - 135deg runs diagonally from the top-left corner towards the bottom right.
Design tips for attractive gradients
- Stay close on the colour wheel. Blue into teal or orange into pink blends cleanly, while opposites such as red and green tend to turn muddy grey in the middle.
- Brighten a dull centre by adding a more vivid stop around 50%.
- Mind your text contrast. White lettering needs enough darkness across the whole surface, so test both ends of the gradient.
- Create stripes with hard stops. Place two stops at the same position, for instance navy 50% and gold 50%, for a crisp edge, then enable Repeating for patterns.
- Keep backgrounds subtle. Gentle shifts in lightness look more polished behind content than bold rainbow mixes.
Need colour values? Convert between HEX, RGB and HSL with the Color Converter, or sample colours from an image with the Color Picker. To trim your stylesheet afterwards, run it through the CSS Minifier.