Gradient Generator

Advanced CSS Gradient Generator

Create complex linear, radial, and conic gradients with advanced controls. Use presets, random generation, export/import functionality, and color format conversion.

Actions

Presets

Direction

Repeating

Color Stops

Pos0%
Pos100%

Color Format

CSS Output

background: linear-gradient(to right, #B95ED9 0%, #4ECDC4 100%);

Avoiding the grey dead zone

A two-stop gradient between complementary colors passes through grey in the middle, because CSS interpolates in sRGB by default and the midpoint of opposing hues is desaturated. Fix it by adding a middle stop with a hue between the two, or by choosing endpoints closer together on the wheel.

Angles and direction

In CSS, 0deg points up and angles increase clockwise, so 90deg runs left to right. That differs from the maths convention, which is the usual source of gradients coming out mirrored.

Frequently asked

Why does my CSS gradient look muddy in the middle?
sRGB interpolation passes through a desaturated midpoint when the two endpoint hues are far apart on the wheel. Add an intermediate color stop, or pick endpoints within about 90 degrees of each other.
What angle does 0deg mean in a CSS gradient?
0deg points to the top of the element and angles increase clockwise. So 90deg goes left to right, 180deg goes top to bottom.
How do I make a gradient fade to transparent?
End on the same color with zero alpha rather than on transparent. In sRGB, the transparent keyword is transparent black, so fading to it darkens the gradient as it fades. Use rgba with your own color and an alpha of 0 instead.