The three gradient types
- Linear: colors blend along a straight line.
- Radial: colors spread out from the center.
- Conic: colors rotate around the center, like a color wheel.
How to make one
- Open the CSS Gradient Generator and choose linear, radial or conic.
- Change the colors and their positions. You can add up to six colors.
- Set the angle for linear and conic gradients.
- Copy the CSS and paste it into your stylesheet, or download a PNG.
How to use the code
Paste the code inside any CSS rule, for example .hero or body. You can also put the value in a style attribute. The code includes a solid fallback color line for very old browsers, followed by the gradient.
Tips
Use colors that are close on the color wheel for a smooth, calm look. Check that text on top of the gradient stays easy to read with the Color Contrast Checker.