CSS Gradient Generator
Design a gradient with two to four colour stops and copy the CSS. See it live as you change the angle, type and colours.
How to make a CSS gradient
Choose the type
Linear, radial or conic.
Pick the colours
Use two to four colours with a position for each.
Copy the CSS
Paste the background rule into your stylesheet.
Worked example
This is what CSS Gradient Generator gives for its own sample values. Open the tool above and change anything to try your own.
- Type
- Linear
- Angle (degrees)
- 90
- Colour 1
- #0f766e
- Position 1 (%)
- 0
- Colour 2
- #38bdf8
- Position 2 (%)
- 100
CSS
background: linear-gradient(90deg, #0f766e 0%, #38bdf8 100%);
About CSS Gradient Generator
Design a gradient and see it live. Pick linear, radial or conic, set the angle, and add up to four colour stops at the positions you want. You get a ready background rule.
FAQs
Can I use transparent colours?
Yes. Write a colour such as rgba(15, 118, 110, 0.5) or transparent.
What angle does 90 degrees mean?
Left to right. 0 degrees runs bottom to top and 180 degrees top to bottom.
Do gradients work everywhere?
Linear and radial gradients work in every current browser, and conic gradients in all modern ones.