CSS Gradient Generator
Build a CSS gradient with 2-5 colour stops, a custom angle and repeating support. Copy the ready rule; runs in your browser.
What the CSS gradient generator builds
The output is one background declaration built from a CSS gradient function, so it needs no image, no extra element and no JavaScript at runtime. Each stop is a colour plus a percentage, sorted from lowest to highest so the browser renders the order you see on the page. A linear gradient uses the angle you choose, a radial one is centred with circle at 50% 50%, and a conic one starts from that angle. A repeating gradient tiles the same stop list without an end. The limitation is engine support: older Safari renders a conic gradient without the smooth midpoints newer browsers produce, and stops placed very close together can band on a 6-bit display, so spread the positions apart if the result looks like a staircase.
How to use it
Press Run with the defaults, or choose linear, radial or conic, move the angle, and edit the stop list so each line is a colour and a position in percent. The rule below can be pasted straight into a stylesheet.
Worked example
Input:
type: linear, angle: 135deg, stops: #0ea5e9 0%, #8b5cf6 50%, #ec4899 100%, repeating: no
Output:
.gradient {
background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 50%, #ec4899 100%);
}
Why it runs in your browser
The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.
The output is one background declaration built from a CSS gradient function, so it needs no image, no extra element and no JavaScript at runtime. Each stop is a colour plus a percentage, sorted from lowest to highest so the browser renders the order you see on the page. A linear gradient uses the angle you choose, a radial one is centred with circle at 50% 50%, and a conic one starts from that angle. A repeating gradient tiles the same stop list without an end. The limitation is engine support: older Safari renders a conic gradient without the smooth midpoints newer browsers produce, and stops placed very close together can band on a 6-bit display, so spread the positions apart if the result looks like a staircase.
Build a CSS gradient with 2-5 colour stops, a custom angle and repeating support. Copy the ready rule; runs in your browser.
How to use it
Press Run with the defaults, or choose linear, radial or conic, move the angle, and edit the stop list so each line is a colour and a position in percent. The rule below can be pasted straight into a stylesheet.
Why it runs in your browser
The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.
What to Expect
What this tool keeps
- The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.
Sample input
type: linear, angle: 135deg, stops: #0ea5e9 0%, #8b5cf6 50%, #ec4899 100%, repeating: no
Sample output
.gradient { background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 50%, #ec4899 100%); }
Frequently asked questions
How do I use the css gradient generator?
Press Run with the defaults, or choose linear, radial or conic, move the angle, and edit the stop list so each line is a colour and a position in percent. The rule below can be pasted straight into a stylesheet.
Is my input uploaded?
Nothing is uploaded. The result is produced on this page.
Is there a size limit?
No: nothing is pasted, so there is no input size to exceed.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.