CSS Gradient Generator
Pick two or three colors, choose linear or radial, preview it live and copy paste-ready CSS.
Gradient preview
Last updated:
How to make a CSS gradient
- Pick the stops. Choose two or three colors for the gradient stops.
- Choose the type. Pick linear with an angle, or radial with a circle or ellipse shape.
- Copy the CSS. Copy the background CSS into your stylesheet.
Keep text off busy middle stops, or test it against the lightest and darkest stop with the contrast checker. To print gradients, enable background graphics in the print dialog.
Frequently asked questions
What is the difference between linear and radial gradients?
A linear-gradient blends colors along a straight line at the angle you set (0deg points up, 90deg points right). A radial-gradient blends outward from a center point in a circle or ellipse.
Can I use more than three stops?
This tool builds two or three stops. For more, copy the CSS and add extra colors inside the parentheses, separated by commas.
Why does the CSS include a background-color?
The solid background-color is the first stop. It shows if the gradient can't be drawn and keeps text readable while the page loads.