Make a gradient you'll want to ship
Pick two colors, tune the steps and direction, then copy the CSS or export your palette.
- Palettes
- 0
- Favorites
- 0
- Steps
- 4
Gradient preview
Color palette
How to use the generator
- Choose a primary and secondary color with the color pickers.
- Set the number of steps. More steps give you more in-between colors in the palette.
- Pick a direction. Diagonal, vertical and horizontal make linear gradients, and radial spreads outward from the center.
- Try a blend mode to layer the gradient over an image or another color.
- Press Copy CSS and paste the result into your stylesheet.
The CSS behind a gradient
A gradient is an image generated by the browser, so you set it with background or background-image. A linear gradient needs an angle and at least two colors.
.hero {
background: linear-gradient(135deg, #667eea, #764ba2);
}
.spotlight {
background: radial-gradient(circle, #667eea, #764ba2);
}
Keep a plain background-color as a fallback for very old browsers.
Linear and radial gradients
A linear gradient moves along a straight line. At 0deg the line runs upward, at 90deg to the right, and 135deg gives the familiar diagonal.
A radial gradient starts at a center point and blends outward. It works well for glows, spotlights and soft backgrounds behind a card or button.
Tips for gradients that look good
Pick two colors close on the color wheel for a calm result, and colors far apart for a bold one. If the middle looks muddy, add a third color there instead of mixing opposites.
When you put text over a gradient, test the contrast against both the lightest and darkest part. A text color that reads well on one end can disappear on the other.
Gradient generator FAQs
Is the generator free?
Yes. You can create, copy and export gradients without an account.
What does Export JSON do?
It saves your palettes and favorites as a JSON file. Bring them back later with Import JSON.
Can I use the CSS commercially?
Yes. A gradient is just CSS, so you can use the copied code in personal and commercial projects.
Why does my gradient look different on another screen?
Screens differ in brightness and color range. Check your gradient on a phone and a laptop before you publish.