CSS Gradient Generator — blend it like ink
Drag color stops, dial the angle, watch the proof render live — then copy standard CSS, prefixed compatibility, or React styles straight into your project.
Color Stops
Three Gradient Families, Decoded
Every CSS gradient belongs to one of three families. Each has its own syntax, its own mental model, and its own best-fit jobs.
Linear
linear-gradient(135deg, …)Colors blend along a straight line. The angle in degrees points where the gradient goes: 0° is up, 90° is right, 135° is bottom-right. The workhorse for hero backgrounds, buttons, and cards.
Radial
radial-gradient(circle at 30% 30%, …)Colors radiate from a center point in circles or ellipses. The at x% y% clause places the center — drag the crosshair in the studio to feel it. Ideal for spotlights, orbs, and soft vignettes.
Conic
conic-gradient(from 90deg at 50% 50%, …)Colors sweep around a center like a radar or pie chart. The from angle sets where the sweep starts. Perfect for gauges, progress rings, and checkerboard or starburst patterns.
Gradient Syntax Cheat Sheet
The anatomy of a gradient function, token by token.
| Token | Example | What it does |
|---|---|---|
angle | 135deg | Direction of a linear gradient, or the start of a conic sweep. 0° points up; degrees increase clockwise. |
at position | at 30% 40% | Places the center of a radial or conic gradient inside the element. |
shape | circle / ellipse | Radial only: whether the blend radiates as a perfect circle or stretches to the element shape. |
color stop | #FF6B6B 0% | A color and its position along the gradient line. Positions are optional and default to even spacing. |
hard stop | #000 50%, #fff 50% | Two stops at the same position create an instant color switch instead of a blend. |
prefix | -webkit-linear-gradient(…) | Old-engine syntax for Android 4.3-, iOS 6-, and old Firefox. List it before the standard syntax. |
fallback | background: #FF6B6B; | A solid color declared first; browsers without gradient support keep it, the rest override it. |
Prefixes & Fallbacks, Sorted
One paste-and-forget block that covers browsers from 2011 to tomorrow.
The order matters
solid → -webkit- → -moz- → standardCSS cascade rules mean the last parseable declaration wins. Declare the solid fallback first, then the prefixed engines, then the standard syntax last. Every CssShift CSS block is already stacked in this order.
When prefixes die
conic: no prefix neededConic gradients shipped in Chrome 69, Firefox 83, and Safari 12.1 without a prefixed era, so no -webkit-conic-gradient exists. CssShift omits prefix lines for conic automatically and keeps them for linear and radial.
The React twist
backgroundImage: 'linear-gradient(…)'Inline style objects use camelCase, so CSS background becomes backgroundImage, and the value must be a string. The React tab emits the object with a plain background fallback line included.
Frequently Asked Questions
What is the difference between linear, radial, and conic gradients?
Do I still need -webkit- and -moz- prefixes for CSS gradients?
-webkit- and -moz- lines plus the standard syntax in one block, so old and new browsers are both covered. Conic gradients shipped without prefixes and need no prefix lines.How do I create a hard color stop with no smooth blend?
linear-gradient(90deg, #FF0000 0%, #FF0000 50%, #0000FF 50%, #0000FF 100%). The color changes instantly at 50% instead of blending. In CssShift, drag two handles onto the same percentage on the ruler.How do I use a CSS gradient in React inline styles?
background becomes backgroundImage: { backgroundImage: 'linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%)' }. The React tab generates this object with a plain background fallback line for old browsers.What fallback should I use for browsers without gradient support?
Why does 135deg go from top-left to bottom-right?
to bottom right are an alternative to angles.