About the CSS Gradient Generator
The CSS Gradient Generator runs entirely in your browser — your code and data never leave your machine. Paste, click, copy the result.
CSS gradients replace heavy image files with pure code — sharp at any resolution, weightless, and animated for free. Build linear or radial gradients with up to three stops, tune the angle, and copy the one-line CSS (with the webkit prefix included for older Safari).
How to use this tool
- Choose linear or radial.
- Pick colors — the preview updates live.
- Adjust the angle and mid-stop position for the exact blend you want.
- Generate and paste into any CSS rule, or use as an inline style.
Gradient ideas that don't look dated
- Brand mesh: two brand hues at 135° with a soft third stop at 50%.
- Hero background: subtle 10–20% lightness difference between stops — gradients scream 2016 when the colors clash.
- Button sheen:
180deg, one color to a 10% darker shade. - Dark UI glow: radial from accent color at 25% opacity to transparent.
Output format
background: linear-gradient(135deg, #4f46e5 0%, #0ea5a4 50%, #22c55e 100%);
Angles: 0deg = bottom→top, 180deg = top→bottom, 90deg = left→right. Percentages are stop positions along the gradient line.
Who is this tool for?
Designers and front-end devs prototyping backgrounds, buttons and hero sections without opening a graphics editor.
Developer tip
For text over gradients, verify WCAG contrast at the lightest point of the gradient — that is where readability usually fails.