CSS Gradient Generator
Create linear and radial gradients and copy the CSS.
CSS Gradient Generator
Design linear and radial gradients visually and copy the CSS instantly.
⚙️ Settings
🎁 Presets
🎨 Color Stops
CSS Code
background: linear-gradient(135deg, #667eea 0%, #764ba2
100%);
📖 How to Use
- Gradient Type: Linear blends colors along a straight line at the angle you choose; Radial spreads them outward from the center.
- Color Stops: Click a swatch to change its color, and adjust the number next to it to set where (in %) that color starts.
CSS Gradient Guide: Smooth, Vibrant Color Transitions
The CSS Gradient Generator is the most intuitive way to design backgrounds where two or more colors blend into each other. Swap a flat, single-color background for a gradient and give your site an instant boost of depth and energy.
1. Linear vs. Radial Gradients
Gradients fall into two main types, depending on how the colors spread.
- Linear Gradient: Colors transition along a straight line at a given angle (in degrees). It's the most common type and works well for buttons and header backgrounds.
- Radial Gradient: Colors radiate outward from a center point in a circle or ellipse. It's great for lighting effects or a soft spotlight that draws the eye.
2. Working with Color Stops
A color stop defines the point (%) where a given color begins. Instead of placing colors only at 0% and 100%, add a similar tone somewhere in the middle and the blend becomes noticeably smoother and more natural. Going the other way, if you give two stops the same position (e.g. red 50%, blue 50%), you get a hard edge — perfect for crisp stripe patterns.
3. Design Tips for Polished Gradients
The easiest way to get a refined gradient is to use neighboring colors on the color wheel. Blue to purple or orange to yellow almost never fails. Be careful with highly saturated complementary colors, though — they can look harsh and tire the eye quickly. Use the built-in Presets to start from tried-and-tested, high-quality color combinations right away.
4. Browser Support and Performance
The code this tool generates uses the standard background: linear-gradient() syntax. Older browsers once required vendor prefixes (-webkit-, -moz-, and so on), but every modern browser handles the standard syntax perfectly on its own. And because a CSS gradient replaces a background image, it saves an HTTP request and helps keep your pages fast.