Skip to content
Free tool

CSS Gradient Generator

Build a linear, radial or conic gradient, see it change as you move the sliders and copy the CSS.

Colours and positions

How to make a CSS gradient

01

Choose linear, radial or conic.

02

Set the angle. Radial gradients do not use one.

03

Pick two to five colours and move each one to where it should sit.

04

Copy the CSS and paste it into the rule for your element.

The code has two lines on purpose. The first sets a plain colour. If a browser cannot draw the gradient, it keeps the plain colour instead of showing nothing.

Linear, radial and conic gradients

TypeHow it blendsOften used for
LinearAlong a straight line at the angle you choosePage heroes, buttons, section backgrounds
RadialOutward from a pointSoft glows and spotlights
ConicAround a point, like a clock handColour wheels and simple pie shapes

In CSS, 0deg points up and 90deg points right, so 135deg runs from the top left to the bottom right.

Tips for gradients that look good

Read how to choose a website colour palette for help choosing colours, or go back to our CSS guide.

CSS gradient generator: checklist graphic summarising “Tips for gradients that look good”
FAQ

CSS Gradient Generator questions, answered

Short, honest answers to the questions people ask most about this topic.

Do CSS gradients slow down a website?

No more than most styles. A gradient is drawn by the browser, so there is no image to download.

All current browsers support linear, radial and conic gradients. The plain colour in the first line is there for anything older.

Yes. Set the gradient as the background, then use background-clip: text with a transparent text colour. Keep a readable plain colour as a backup.

Yes. The code is plain CSS, and you can use it anywhere.

Next step

More free tools

Find tools for images, text, code, search and speed, or plan your budget with the cost calculator.