Gradient Generator
Design a smooth two-color linear gradient — then copy the CSS straight into your stylesheet.
How it works
A CSS linear gradient blends two (or more) colors along a straight line. The angle sets the direction of that line: 90deg runs left to right, 180deg runs top to bottom, and 0deg runs bottom to top — any angle in between tilts the blend diagonally. The browser computes every in-between shade by interpolating the red, green, and blue channels of your two colors, which is what makes the transition perfectly smooth with no banding. The snippet this tool produces is a plain background declaration, so it works anywhere a background image would — buttons, hero sections, cards — and you can paste it into any stylesheet as-is.
How to use
- Pick a start color and an end color with the two color pickers.
- Set the angle: 90° runs left to right, 180° top to bottom, 0° bottom to top — anything in between tilts the blend diagonally. Small changes near the diagonals (45°, 135°) produce very different looks, so adjust slowly there.
- Fine-tune by nudging the colors and angle until the blend looks right; the result updates as you adjust.
- Click “Copy CSS” and paste the snippet straight into your stylesheet — it is a plain
backgrounddeclaration, ready to use.
Frequently asked questions
What CSS does it generate?
A plain linear-gradient() background declaration, for example background: linear-gradient(90deg, #1d4ed8, #e76f51);. It works anywhere a background image would — buttons, hero sections, cards — and pastes into any stylesheet as-is. Layer it under text with a semi-transparent overlay, or set background-size, for readable headlines over the blend.
How do the gradient angles work?
The angle sets the direction of the blend line: 0deg points bottom-to-top, 90deg left-to-right, 180deg top-to-bottom, and 270deg right-to-left. Diagonal values like 45deg or 135deg tilt the transition across the corner.
Why does the blend look perfectly smooth?
The browser computes every in-between shade by interpolating the red, green, and blue channels of your two colors, so the transition has no banding — just a continuous blend.
Can I use more than two colors?
The generated snippet uses two color stops, but you can hand-edit it to add more: linear-gradient(90deg, red, yellow, green) blends smoothly through all three.