
How to use
- Choose LINEAR or RADIAL. For a linear gradient, set the angle.
- Edit the color stops: pick each color and its position (0–100%), use ADD STOP for more colors, and drag stops in the list to reorder them. The preview updates as you go.
- Click Copy CSS and paste the line into your stylesheet.
CSS gradients in one line
A CSS gradient is an image the browser draws from a few colors, so it needs no file, stays sharp at any size and loads instantly. This builder writes the line for you, for example: background: linear-gradient(90deg, #3b82f6 0%, #9333ea 100%);
Linear and radial gradients without vendor prefixes work in every current browser, so the copied CSS can be used as is.
Angles and stops
In a linear gradient the angle sets the direction the colors flow toward:
| Angle | Direction |
|---|---|
| 0deg | Bottom to top |
| 90deg | Left to right |
| 180deg | Top to bottom (the default) |
| 135deg | Top left to bottom right, a popular diagonal |
Ready-made gradients to start from
Paste one of these into the builder's stops, or straight into your CSS, and adjust from there:
| Style | CSS | Good for |
|---|---|---|
| Sunset | linear-gradient(135deg, #f97316 0%, #ec4899 100%) | Hero banners, call-to-action buttons |
| Ocean | linear-gradient(180deg, #0ea5e9 0%, #1e3a8a 100%) | Headers and app backgrounds |
| Mint | linear-gradient(90deg, #a7f3d0 0%, #14b8a6 100%) | Soft cards, health and finance sites |
| Spotlight | radial-gradient(circle, #ffffff 0%, #e5e7eb 60%, #9ca3af 100%) | Product photos on a plain backdrop |
| Hard stripe | linear-gradient(90deg, #111827 50%, #f59e0b 50%) | Split backgrounds with a sharp edge |
Tips for good-looking gradients
Two or three colors close on the color wheel, such as blue to purple or orange to pink, look smooth; complementary colors such as red and green can turn muddy in the middle. Placing two stops at the same position makes a hard edge instead of a blend, useful for stripes. A radial gradient from a light center to a darker edge adds depth to a hero section or a button.
Keep text readable: put text over the darker part, or add a semi-transparent overlay, and check the pair with the Contrast Checker.
Frequently asked questions
Should I use background or background-image?
Either works. background-image keeps any background color you set as a fallback; the background shorthand replaces it.
Does it make conic or repeating gradients?
No. It builds linear and radial gradients, which cover most backgrounds and buttons.
Can I use the CSS in Tailwind or React?
Yes. Paste it into an inline style, a CSS module, or a Tailwind arbitrary value such as bg-[linear-gradient(90deg,#3b82f6,#9333ea)].
Is anything uploaded?
No. The CSS is generated in your browser.