Click the bar to add a stop. Drag a handle, or focus it and use the arrow keys (Shift for 10%). Delete removes it.
Selected stop 1
Palettes (keep the current type and angle)
Patterns (set type, angle and stops)
background-color: #6366f1; background-image: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
How to use
Pick a type and a starting point
Choose Linear, Radial or Conic, then click a palette (keeps your type and angle) or a pattern (sets type, angle and stops together). Random and Reverse give quick variations.
Edit the stops and geometry
Drag the handles on the stop bar or focus one and use the arrow keys. Set each stop's color, position and opacity, then the angle, radial shape and size, center point, Repeating and color blending.
Check it and copy
Switch the preview between Background, Gradient text, Button and Card. Copy the CSS, Tailwind, SCSS or gradient text code, download a 1600 x 900 PNG, or copy a share link.
Why CSS Gradient Generator
- Linear, radial and conic gradients with up to ten draggable stops and per-stop opacity.
- 40 palettes plus pattern presets for color wheels, pie charts, stripes and spotlights.
- OKLab, OKLCH or HSL blending with an sRGB fallback line.
- CSS, Tailwind, SCSS and gradient text output, PNG download and share links.
Linear vs radial vs conic gradients
All three take the same list of color stops. What changes is the path the colors follow. Stop positions mean distance along a line for linear, distance from the center for radial, and angle around the center for conic.
Each type also has a repeating version, such as repeating-linear-gradient, which tiles the stop pattern across the element. That is the usual way to draw stripes. Switch on Repeating in the tool to write it.
| Type | Colors change along | Example | Good for |
|---|---|---|---|
| Linear | A straight line at an angle | linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) | Backgrounds, buttons, fades |
| Radial | Outward from a center point | radial-gradient(circle at 30% 20%, #fde047 0%, #f97316 100%) | Spotlights, glows, vignettes |
| Conic | Around a center point | conic-gradient(from 0deg, #ef4444 0%, #ef4444 25%, #3b82f6 25%, #3b82f6 100%) | Pie charts, color wheels, spinners |
Radial gradient size keywords
The Size dropdown on the Radial tab controls where the gradient ends, which is where the 100% stop sits. The default, farthest-corner, is left out of the output because browsers use it anyway.
Size matters most when the center is moved away from the middle. With the center at 20% 20%, closest-side ends the gradient near the top-left edge, while farthest-corner stretches it to the bottom-right corner. Try both with Center X and Center Y to see the difference.
| Keyword | The gradient ends at | Effect |
|---|---|---|
| farthest-corner | The corner farthest from the center | Default; the widest, softest spread |
| farthest-side | The side farthest from the center | Slightly tighter than farthest-corner |
| closest-corner | The corner nearest the center | Tighter when the center is off to one side |
| closest-side | The side nearest the center | Smallest; the last color fills the rest |