Skip to content

CSS Gradient Generator

Build linear, radial and conic CSS gradients with 2 to 8 color stops. Drag the stops or type exact values, then copy the CSS or a Tailwind class.

Stop positions

Drag a handle, or focus it and press the arrow keys.

Presets
Type
Color stops (2 of 8)

0 to 100%

0 to 100%

A gradient needs at least 2 stops, so neither can be removed.

CSS
background: linear-gradient(135deg, #ff7a59 0%, #6a3093 100%);
Tailwind
bg-[linear-gradient(135deg,#ff7a59_0%,#6a3093_100%)]

01 · Definition

What is a CSS gradient?

A CSS gradient is an image the browser draws from a list of color stops, so it needs no image file and scales to any size. linear-gradient() blends along a line at an angle, radial-gradient() blends outward from a point, and conic-gradient() sweeps around a point like a color wheel.

02 · Overview

How the CSS Gradient Generator works

This is a visual gradient builder for CSS. Choose linear, radial or conic, set the angle, and add up to 8 color stops. Move a stop by dragging its handle, with the arrow keys, or by typing a position from 0 to 100%. The preview updates on every change. Copy the result as a CSS background declaration or as a Tailwind arbitrary-value class. Everything runs in your browser.

03 · Guide

CSS gradient syntax: linear, radial and conic

Each gradient type is a CSS function that takes a direction or position followed by a comma-separated list of color stops. A stop is a color and a position from 0% to 100%. The table shows the exact form this tool writes for each type.

In linear-gradient() the angle sets the direction the colors travel: 0deg points up, 90deg points right, and larger values turn clockwise, so the default 135deg runs from the top left to the bottom right. In conic-gradient() the from angle is where the sweep starts.

TypeCSS writtenWhat you set
Linearlinear-gradient(135deg, #ff7a59 0%, #6a3093 100%)Angle, stops
Radialradial-gradient(circle at center, #f6d365 0%, #fda085 100%)Stops only: always a circle from the center
Conicconic-gradient(from 0deg at 50% 50%, #ff7a59 0%, #ffd166 33%, #4d9de0 66%, #ff7a59 100%)Start angle, stops: always centered
What the tool writes for each gradient type

04 · Use cases

When to use the CSS Gradient Generator

  1. 01

    Build a hero background gradient and copy it as one CSS declaration

  2. 02

    Rebuild a gradient from a design file by typing its hex stops and positions

  3. 03

    Prototype a button or card surface with a two-stop gradient

  4. 04

    Get a Tailwind class that renders exactly the same gradient as the CSS

05 · Examples

CSS Gradient Generator examples

Linear, 135°, #ff7a59 at 0% and #6a3093 at 100%

ex 01

background: linear-gradient(135deg, #ff7a59 0%, #6a3093 100%);

The default two-stop diagonal gradient.

Radial, three stops

ex 02

background: radial-gradient(circle at center, #f6d365 0%, #fda085 50%, #f76b1c 100%);

Radial gradients are always a circle from the center, so there is no angle.

Linear, 90°, middle stop at 45%

ex 03

background: linear-gradient(90deg, #0ea5e9 0%, #6366f1 45%, #ec4899 100%);

The middle stop sits at 45% rather than 50%, so the blue holds slightly longer.

Conic, start angle 0°, four stops (the Wheel preset)

ex 04

background: conic-gradient(from 0deg at 50% 50%, #ff7a59 0%, #ffd166 33%, #4d9de0 66%, #ff7a59 100%);

The first and last stops match, so the sweep has no visible seam.

Tailwind output for the default gradient

ex 05

bg-[linear-gradient(135deg,#ff7a59_0%,#6a3093_100%)]

An arbitrary value: underscores stand for spaces, and it works in Tailwind v3 and v4.

06 · FAQ

Gradient: frequently asked questions

Can I add more than two color stops?

Yes, up to 8. A new stop lands in the middle of the widest gap and takes the color the gradient already has there, so adding it does not change the preview. Each stop has a hex color and a position from 0 to 100%. Move a stop by dragging its handle, by focusing the handle and pressing the arrow keys (Shift moves 10 at a time), or by typing the position.

What's the difference between linear, radial and conic?

A linear gradient blends along a straight line set by an angle. A radial gradient blends outward from a point in rings; this tool always uses a circle from the center. A conic gradient sweeps around a point, like a pie chart or color wheel, starting at the angle you set.

Why does my gradient look banded?

Banding usually comes from low contrast between adjacent stops on a wide gradient. Add intermediate stops or increase the color distance. This tool outputs plain sRGB gradients; in your own CSS you can also write linear-gradient(in oklch, ...) for a smoother blend in browsers that support it.

Does the Tailwind output use the gradient utilities?

No. It is always an arbitrary value, such as bg-[linear-gradient(135deg,#ff7a59_0%,#6a3093_100%)], which works in Tailwind v3 and v4 and renders exactly what the preview shows. Tailwind's own from-, via- and to- utilities cannot express every stop position, and in v4 they blend in OKLAB by default, so they would not match the plain CSS.

How do I fade a gradient to transparent without it going grey?

Fade to a zero-alpha version of the same color rather than to the transparent keyword, which older engines treat as transparent black. This tool takes opaque hex colors only, so copy the CSS and change the last stop by hand, for example from #ff7a59 to rgba(255, 122, 89, 0).

Can I animate a CSS gradient?

Not directly. background-image isn't an animatable property, so browsers jump between gradients instead of interpolating. The three workarounds are animating background-position across an oversized gradient, cross-fading two stacked layers with opacity, or registering a custom property with @property and animating that value.

07 · Guides

Gradient guides

08 · Reference

Specs and further reading

These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.

  • linear-gradient()

    MDN Web Docs. Syntax reference for gradient lines, color stops, and interpolation hints.

  • conic-gradient()

    MDN Web Docs. Syntax reference for the from angle and at position this tool emits.

  • CSS Images Module Level 4

    W3C. The specification that defines linear, radial and conic gradients and color-stop placement.

09 · More

Tools that pair with Gradient

Last updated .