Three things define a gradient
Direction, stops and interpolation. The angle runs zero upward, ninety to the right, one hundred eighty downward. Stops pair a colour with a position, usually a percentage, and interpolation happens linearly in sRGB by default. The tool exposes an angle field and stop management via add and delete, where three or more stops produce rainbow or metallic looks.
Steps
- Set the angle: 90 for left to right, 180 for top to bottom, 45 for diagonal.
- Add stops, then drag or type positions and pick colours.
- The current stop highlights what you are editing; two stops is the minimum.
- Copy code, download the CSS, or load the example.
- Reset returns to two endpoint colours.
Stop positions shape the result
Unequal positions create a hard edge: with one stop at zero and another at thirty percent, the whole transition happens in that first third and the rest is flat colour. Placing two stops at the same position yields a crisp boundary. Metallic looks use dark, light, dark with the highlight biased a third of the way in. Rainbows need five or more evenly spaced stops.
Interpolation and muddy blends
sRGB interpolation between saturated colours passes through grey — blue to yellow turns muddy green-grey, the dead grey band. Three fixes: interpolate in a perceptually uniform space, insert a lighter intermediate stop to lift the path, or choose nearer hues. Transparency has the same issue: fading to the keyword transparent darkens, so fade to a zero-alpha version of the same colour.
Where gradients work
Large backgrounds want low saturation and adjacent hues over long distances; button gradients want short spans with close endpoints or they look cheap. Gradient text needs background-clip and must hold contrast on dark grounds. When layering over patterns, order decides what sits on top. Dark mode needs lower lightness and higher saturation, or desktop values grey out. Two gradient moments per page is plenty.