CSS linear gradient generator
Build a CSS linear gradient visually. Set the direction angle, add up to 8 color stops, and position each stop precisely. The live preview updates in real time and you can copy the full CSS value with one click. All generation runs locally in your browser.
CSS
GRADIENT
Type
Angle: 135deg
Color stops
How it works
The CSS gradient string is built from the selected type, angle, and color stops. For linear gradients: linear-gradient(Ndeg, color1 P1%, color2 P2%, ...). For radial: radial-gradient(circle, ...). For conic: conic-gradient(from Ndeg, ...). Color stops are sorted by position before the string is assembled. The string is applied directly as a CSS background property on the preview element. All processing runs in JavaScript in your browser.
Processing runs in your browser
All processing happens locally in your browser tab. Our servers are not involved at any point.
Related operations
For building a coordinated multi-colour set first, try the colour palette generator. To soften or deepen any stop value, use tints and shades. For converting your stop colours between formats, see the colour converter.
Frequently asked questions
- What is a CSS linear gradient?
- A CSS linear gradient creates a smooth transition between two or more colors along a straight line. The direction is set by an angle (0deg = bottom to top, 90deg = left to right). Syntax: linear-gradient(angle, color1 stop1, color2 stop2, ...).
- How do I set the gradient angle?
- Use the angle slider or type a value directly. 0deg goes from bottom to top, 90deg goes from left to right, 180deg goes from top to bottom, and 270deg goes from right to left. You can also use keywords like 'to right' or 'to bottom right'.
- Can I add more than two color stops?
- Yes. This generator supports 2 to 8 color stops. Each stop has a color and a position (0–100%). Click 'Add stop' to add more colors. Stops can be dragged to reorder or deleted individually.
- Is my data sent to a server?
- All calculations run locally in your browser. No data is sent to our servers.