About this tool
Build a two-colour CSS gradient visually and copy a ready-to-paste background declaration. The preview and the code are generated in your browser.
Choose Linear or Radial. A linear gradient has an angle slider from 0 to 360 degrees, where 0 points up, 90 points right (the default), 180 points down and 270 points left. A radial gradient is always a circle radiating from the centre, so the angle control is hidden. Pick the two colours with the colour inputs and place each one with its position slider, from 0 to 100 percent.
The output is a single line such as background: linear-gradient(90deg, #6366f1 0%, #ec4899 100%); with the colours written as 6-digit hex values. Press Copy to put that line on the clipboard.
There are exactly two colour stops: this is not a multi-stop editor, and it does not offer ellipse shapes, off-centre radial positions or transparency. Add extra stops by hand-editing the copied text. If the first position is higher than the second, the browser still renders it, but the stops cross, giving a hard edge. Nothing is uploaded.