CSS Gradient Generator
Create linear, radial, and conic CSS gradients with live preview and instant code. 100% client-side.
🎨 Color stops (2/10)
background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
background-image: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
⚡ Curated presets
About CSS Gradient Generator
CSS gradients are one of the most efficient ways to add visual depth to a web design — no images to download, no loading time, and they scale perfectly to any size. CSS supports three gradient types: linear (along a straight line at any angle), radial (from a center point outward), and conic (around a center point like a color wheel). Each type accepts multiple color stops with precise positions. Hand-writing gradient CSS is error-prone: you must remember the syntax for each type, calculate angles, and manage the positions of every stop. This visual generator lets you build gradients by clicking, dragging stops, and adjusting the angle — the CSS updates in real time.
How It Works
- Choose a gradient type: Linear, Radial, or Conic.
- Add, edit, or remove color stops (color + position).
- For linear gradients, adjust the angle or use quick-direction buttons.
- For radial gradients, choose the shape (circle/ellipse) and size.
- Copy the generated CSS and paste it into your stylesheet.
✨ Key Features
- ✓Linear, radial, and conic gradients
- ✓Up to 10 color stops
- ✓Adjustable angle (linear) with presets
- ✓Adjustable shape and size (radial)
- ✓Precise stop positions (0–100%)
- ✓Live preview with adjustable size
- ✓Generated CSS in multiple formats (background, background-image, inline)
- ✓20+ curated presets
- ✓Random gradient generator
- ✓Copy CSS with one click
- ✓100% client-side — no data sent to any server
🎯 Common Use Cases
- →Creating button gradients for a website
- →Designing hero section backgrounds
- →Generating gradient text effects
- →Building gradient borders and cards
- →Creating theme colors for a design system
- →Experimenting with color combinations
- →Producing gradient backgrounds for presentations
- →Learning CSS gradient syntax by example
💡 Advanced Tips & Pro Insights
- ▸Linear gradients: the angle is measured clockwise from "to top" (0° = bottom to top, 90° = left to right, 180° = top to bottom). Use "to right" syntax for keyword directions.
- ▸Radial gradients: specify shape (circle or ellipse), size (closest-side, farthest-corner, etc.), and position (center by default).
- ▸Conic gradients: rotate around the center like a pie chart. Add "from Xdeg" to rotate the starting angle.
- ▸For smooth gradients, place color stops 10–20% apart. Very close stops create hard edges.
- ▸Modern browsers support `oklch()`, `lch()`, and `color-mix()` for perceptual color interpolation. The generated CSS uses hex for compatibility.
- ▸For animated gradients, animate the background-position with a larger background-size — a common trick for shimmer effects.