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.
Drag a handle, or focus it and press the arrow keys.
0 to 100%
0 to 100%
A gradient needs at least 2 stops, so neither can be removed.
background: linear-gradient(135deg, #ff7a59 0%, #6a3093 100%);
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.
| Type | CSS written | What you set |
|---|---|---|
| Linear | linear-gradient(135deg, #ff7a59 0%, #6a3093 100%) | Angle, stops |
| Radial | radial-gradient(circle at center, #f6d365 0%, #fda085 100%) | Stops only: always a circle from the center |
| Conic | conic-gradient(from 0deg at 50% 50%, #ff7a59 0%, #ffd166 33%, #4d9de0 66%, #ff7a59 100%) | Start angle, stops: always centered |
04 · Use cases
When to use the CSS Gradient Generator
- 01
Build a hero background gradient and copy it as one CSS declaration
- 02
Rebuild a gradient from a design file by typing its hex stops and positions
- 03
Prototype a button or card surface with a two-stop gradient
- 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 01background: linear-gradient(135deg, #ff7a59 0%, #6a3093 100%);
The default two-stop diagonal gradient.
Radial, three stops
ex 02background: 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 03background: 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 04background: 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 05bg-[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?
What's the difference between linear, radial and conic?
Why does my gradient look banded?
Does the Tailwind output use the gradient utilities?
How do I fade a gradient to transparent without it going grey?
Can I animate a CSS gradient?
07 · Guides
Gradient guides
- HEX vs RGB vs HSL vs OKLCH: CSS Color Formats Compared→
HEX and RGB give red, green and blue. HSL gives hue, saturation and lightness. OKLCH gives perceptual lightness, chroma and hue. With conversion tables.
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
Color Palette GeneratorAI-powered
Type a vibe such as 'desert at dusk' or 'cyberpunk lab' and get a 5-color palette with hex, RGB, HSL and OKLCH for every swatch.
CSS Box Shadow Generator
Build CSS box shadows with sliders for offset, blur, spread, color and opacity. Stack up to 6 layers, preview live, copy as CSS or Tailwind.
CSS Animation Generator
Pick one of 12 CSS keyframe animations, set duration, delay, easing, iterations and direction, preview it, and copy the @keyframes CSS or a Tailwind class.
Color Picker & Converter
Convert a color between HEX, RGB, HSL, OKLCH and CMYK. Paste any of those formats or a CSS color name, and see WCAG contrast against white and black.
Glassmorphism Generator
Build a frosted-glass card with sliders for blur, opacity, saturation, border and radius. Preview it over five backdrops and copy the CSS or Tailwind.