Skip to main content
CSS Tools

CSS Gradient Generator

Design linear and radial CSS gradients visually and copy the code.

How to use CSS Gradient Generator

  1. Choose a linear or radial gradient.
  2. Set the angle (linear) or the shape and centre (radial).
  3. Pick your colours and move each one along the gradient to set its position.
  4. Add or remove colours, then click Copy CSS and paste it into your stylesheet.

Example

background: linear-gradient(90deg, #0f766e 0%, #38bdf8 100%);
This blends from teal on the left to light blue on the right. Change 90deg to 180deg to blend from top to bottom.

About CSS Gradient Generator

A CSS gradient is a smooth blend between two or more colours, drawn by the browser with no image file. Gradients load instantly, scale to any size and are easy to change.

A linear gradient blends along a straight line. Its angle sets the direction: 0° points up, 90° points right, 180° points down. A radial gradient spreads outward from a centre point. Each colour has a position from 0% to 100% that controls where it sits in the blend.

Gradients are widely used for backgrounds, buttons, hero sections and overlays on images. The generated CSS works in all current browsers.

Who can use this css gradient generator?

Front-end developers styling websites, designers prototyping backgrounds and buttons, and students learning CSS who want to see the code change as they adjust the controls.

Features

  • Linear and radial gradients
  • Angle control with direction presets
  • Up to 8 colours with adjustable positions
  • Live preview and copyable CSS

Frequently asked questions

How do I use the generated CSS?

Paste the line into a rule for the element you want to style, for example .hero { background: linear-gradient(...); }.

What do the colour positions mean?

A position is how far along the gradient line a colour is fully reached. Moving two colours close together makes a sharper transition between them.

What is the difference between linear and radial gradients?

A linear gradient changes colour along a straight line. A radial gradient changes colour outward from a centre point in a circle or ellipse.

How do I change the direction of a linear gradient?

Change the angle. 0° points up, 90° right, 180° down and 270° left.

Does the order of colours matter?

The output is sorted by position, so colours always appear in the order they sit along the gradient, whatever order you added them in.