CSS Gradient Generator
This tool builds a CSS gradient from the colours you type. It writes linear, radial or conic gradients with an angle, and shows a preview you can copy the code from.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use CSS Gradient Generator online
- Type the colours. Separated by commas.
- Pick the type. Linear, radial or conic.
- Set angle and options. Fallback and repeat.
- Copy the CSS. Paste it into your stylesheet.
Why use this free CSS Gradient Generator
- Linear, radial and conic
- Angle and stop positions
- Hex, rgb, hsl and names
- Fallback colour
- Repeating option
- Live preview
What a gradient is
A CSS gradient is a background that changes smoothly from one colour to another. It is drawn by the browser, so it needs no picture file, scales to any size and loads at once. This tool writes the line of CSS for you from the colours and options you pick, and shows a preview of the result.
The three types
A linear gradient runs along a straight line at an angle you choose, where 0 degrees points up and 90 degrees points right. A radial gradient spreads from the centre outwards, as an ellipse or a circle. A conic gradient sweeps round the centre like the hands of a clock, starting at the angle you give. Conic gradients suit pie shapes and colour wheels.
Writing the colours
Type colours separated by commas. A colour can be hex, such as #ff7a18, a function such as rgb() or hsl(), or a common name such as teal. Add a position after a colour, for example #af002d 60%, to say where it is full strength. Colours without a position are spread evenly between their neighbours.
Fallback and repeating
Very old browsers ignore gradients, so the tool can add a plain background colour before the gradient line. The browser uses it only if the gradient is not understood. The repeat option makes the pattern repeat, which gives stripes when the positions are close together. The preview draws plain linear and radial gradients; conic and repeating ones are shown by the code only.
Using the code
Copy the lines into a rule for any element, such as body, a button or a card. Check that text on top of the gradient is still easy to read at both ends, since a colour that suits the middle may not suit the corners. Gradients are a decoration; they do not replace a good contrast between text and background.
Using the tool
As you type in the CSS Gradient Generator, the result appears at once. Undo and redo step back through your earlier text.
CSS Gradient Generator: frequently asked questions
How do I make a diagonal gradient?
Can I use more than two colours?
What colour formats work?
Why is there no preview for a conic gradient?
Does the generator support transparency?
Does the CSS Gradient Generator keep a copy of my text?
Is there a way to reuse the CSS Gradient Generator result?
Related searches for CSS Gradient Generator
- CSS Gradient Generator online
- free CSS Gradient Generator
- CSS Gradient Generator online free
- CSS Gradient Generator for mobile
- CSS Gradient Generator without sign up
- CSS Gradient Generator – Developer & Web Tools
CSS Gradient Generator is a free online tool on MAITBOX, in the Developer & Web Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.