Modern CSS Gradient Generator and Designer
Create eye-catching background gradients with visual controls and one-click CSS copy.
Hero sections, buttons, card backgrounds and email banners often need a smooth blend of two or three colours, and writing the CSS by memory is fiddly. A front-end developer may want a quick diagonal wash behind a landing page headline, a student may need a radial glow for a class project site, and a designer may simply want to see how a pair of brand colours behave together before committing. This page lets you experiment visually and then copy working code.
Choose Linear Gradient or Radial Gradient at the top. For linear mode, drag the Angle Direction slider between 0 and 360 degrees; 90 degrees runs left to right and 180 degrees runs top to bottom. Pick the first and second colours with their swatches or HEX fields, and optionally add a third colour. Watch the Preview Canvas change as you go. When it looks right, press Copy CSS to take the generated background declarations straight into your stylesheet.
The output has two lines: a plain background colour set to your first colour, followed by the gradient itself. The first line is a fallback for very old browsers, and you can delete it if you do not need it. Stops are placed automatically, the first at 0 percent and the others at 100 percent, so in this version you cannot drag stops to custom positions, and a third colour shares the 100 percent position with the second. Radial gradients are always circles, and the angle slider is hidden for them.
Example: with Linear selected, angle 135 degrees, first colour #4f46e5 and second #ec4899, the copied CSS ends with linear-gradient(135deg, #4f46e5 0%, #ec4899 100%). That blends from indigo at the top left to pink at the bottom right. If the middle of a gradient looks muddy, as it can between complementary colours, add a third colour that sits between them on the colour wheel. Then test any text you place on top with the contrast checker at both ends of the blend.
Key Highlights:
- Linear and Radial modes
- Interactive angle wheel/slider
- Multi-color stop management
- Curated gradient presets

