Gradient generator
Drag the stops, set the angle and copy the CSS: linear-gradient(90deg, #1F5BFF 0%, #FF6FB5 100%).
background: linear-gradient(90deg, #1F5BFF 0.0%, #4A64F7 12.5%, #686AEF 25.0%, #846FE6 37.5%, #9D72DD 50.0%, #B674D4 62.5%, #CF74CA 75.0%, #E772C0 87.5%, #FF6FB5 100.0%);
background: linear-gradient(in oklch 90deg, #1F5BFF 0%, #FF6FB5 100%);
bg-[linear-gradient(in_oklch_90deg,_#1F5BFF_0%,_#FF6FB5_100%)]
Free·No sign-up·Works offline after the first visit
How to use
- 1
1. Click the bar to add a color stop, drag stops to move them, drag one off the bar to remove it.
- 2
2. Choose Linear, Radial or Conic and turn the angle dial.
- 3
3. Copy the CSS or the Tailwind classes, or download a PNG.
- Sunset: #FF5F6D, #FFC371
- Ocean: #2193B0, #6DD5ED
- Mint lime: #00B09B, #96C93D
- Peach: #FFE5B4, #FF7F50
- Night sky: #0F2027, #203A43, #2C5364
- Lavender haze: #E6E6FA, #967BB6
- Candy: #FF6FB5, #FFD6E8
- Royal: #000080, #4169E1
- Forest: #134E5E, #71B280
- Gold: #D4AF37, #FFD700, #FFF4C2
- Gray fog: #F7F6F3, #BDC3C7
- Neon: #FF10F0, #1F51FF
Blending in sRGB can pass through a dull gray middle, for example from blue to yellow. Blending in OKLCH keeps the middle bright and the lightness even. The tool shows both side by side; the CSS uses in oklch with an sRGB fallback for older browsers.
| use | size |
|---|---|
| desktop wallpaper or slide | 1920 × 1080 px |
| phone wallpaper | 1170 × 2532 px |
| social post | 1080 × 1080 px |
How to make a CSS gradient
A gradient is a smooth blend between two or more colors. In CSS it is an image, so you set it with background or background-image. A linear gradient runs in a straight line at an angle: 90deg goes left to right, 180deg top to bottom. A radial gradient spreads out from a point, like a circle or an ellipse. A conic gradient turns around a center, like a color wheel or a pie chart.
Each color stop has a color and a position. Two stops at the same position make a hard line instead of a blend, which is how you make stripes. For a gradient border, set the gradient as the background of a wrapper and give the inner element a solid background, or use border-image. The generator writes the code for all of these, and Tailwind users get the bg-gradient-to-r from-… to-… classes.
Smooth gradients with OKLCH
The classic sRGB blend works for close colors, but between far-apart hues it often looks muddy in the middle. Modern browsers can blend in OKLCH, a color space built on how people see lightness and hue. The result is brighter and more even. The generator outputs linear-gradient(in oklch 90deg, …) and a plain sRGB line before it, so browsers that don't know OKLCH still show a gradient.
Questions and answers
How do I make a gradient in CSS?
Use background: linear-gradient(90deg, #1F5BFF, #FF6FB5);. Build it above and copy the line.
How do I make a radial or circle gradient?
Choose Radial, then Circle, and copy radial-gradient(circle, …).
How do I make a gradient border in CSS?
Use border-image: linear-gradient(…) 1; or put the gradient on a wrapper with padding. The generator gives both.
Can I download a gradient as an image?
Yes. Download a PNG at 1920 × 1080, 1080 × 1080 or as a 1170 × 2532 phone wallpaper.