How to use the CSS Gradient Generator
- Pick the gradient type and angle
- Adjust the colors and stops
- Copy the CSS code
Linear, radial and conic gradients
Choose linear (at any angle), radial (circle or ellipse) or conic, add as many colour stops as you like and drag their positions, then copy the CSS. The code includes a solid fallback colour for very old browsers. Press ๐ฒ Random for inspiration.
More colours and transparency
- Three or more colours โ click โ+ Add color stopโ and place it, for example at 50%.
- Transparency โ the colour pickers are solid, so in the copied code replace a stop with
transparentor anrgba()value such asrgba(79, 70, 229, 0.5).
Gradient text
Copy the background, then add -webkit-background-clip: text; background-clip: text; color: transparent; to the same element.
Tailwind and animation
- Tailwind CSS โ use
bg-linear-to-r from-indigo-600 to-pink-500(v4;bg-gradient-to-rin v3), or paste the exact CSS as an arbitrary value:bg-[linear-gradient(135deg,#4f46e5_0%,#ec4899_100%)]. - Animated gradients โ set
background-size: 200% 200%and animatebackground-positionwith@keyframes.
Matching an image or existing code
To match a picture, pick its colours with the Image Color Picker and enter them as stops. To edit a gradient you already have, copy its colours and angle into the controls.