Design tool
CSS Gradient Generator
Pick the colors, choose linear or radial, and copy the CSS. A middle color is optional.
Gradient options
Leave the middle empty for two colors. 90 runs left to right. A radial gradient can be a circle or an ellipse.Result updates here as you change the fields.
How to build a CSS gradient
- Set the start and end colors. Add a middle color only if you want three stops.
- Choose linear and an angle, or radial and a circle or an ellipse.
- Check the preview and copy the CSS.
The output is a background property. An empty middle color keeps two stops. 90 runs left to right. A radial ellipse follows the box, and a circle stays round.
Frequently asked questions
Which color format should I use?
Hex colors such as #4f46c7. Three-digit hex is expanded.
Is the CSS uploaded?
No. The preview and the property are created in your browser.
Related design tools
Keep working without leaving the site.
Color converter
Switch a color between HEX, RGB, and HSL.
Open toolColor contrast checker
See whether two colors pass WCAG AA and AAA.
Open toolPX and REM
Convert pixels to rem, or rem back to pixels.
Open toolBorder radius
Preview a border-radius and copy the CSS property.
Open toolTints and shades
Build lighter and darker steps from one hex color.
Open toolAspect ratio
Simplify a width and height, or find the missing side.
Open tool