CSS Gradient Generator
Design linear, radial and conic gradients with a live preview. Add color stops, tweak the angle, then copy the CSS or download the gradient as a PNG.
CSS code
Paste this into your stylesheet.
How to use Gradient Generator on KickSolve
Three quick steps, no account needed.
Why choose KickSolve
Built for speed, privacy and clean results.
What you can do with Gradient Generator
Everything this tool offers.
About Gradient Generator on KickSolve
How CSS gradients work and how to get the most from them.
How CSS gradients work
A gradient is an image the browser draws for you, so it goes in background or background-image, not background-color. It is defined by a type, a direction or center point, and a list of color stops. Because it is generated by CSS, it is resolution independent and adds no image download.
Linear, radial and conic
A linear gradient blends along a straight line set by an angle: 0deg points up, 90deg right, 180deg down and 270deg left. A radial gradient spreads outward from a center point as a circle or an ellipse. A conic gradient sweeps around a center like the hand of a clock, which suits pie charts and color wheels.
Color stops and hard edges
Each stop is a color and a position. The colors blend between neighboring stops. Put two stops at the same position and you get a hard edge instead of a blend, which is how stripes and pie slices are made.
Tips for smooth, readable gradients
Blending two very different colors can look muddy in the middle, so add a stop between them or pick colors close in hue. If text sits on a gradient, test the lightest and darkest parts with the Contrast Checker. Need the colors in another format? Use the Color Converter.
Browser support
The standard linear-gradient() and radial-gradient() work in every current browser without a vendor prefix, and conic-gradient() has worked in all major browsers since late 2020. Shrink your finished stylesheet with the HTML, CSS and JS Minifier, and if you export a PNG, run it through Compress Image to cut the file size.
CSS gradient direction keywords
How angles and keywords line up.
| Keyword | Angle | Direction |
|---|---|---|
to top | 0deg | Bottom to top |
to top right | varies | Bottom-left corner to top-right corner |
to right | 90deg | Left to right |
to bottom right | varies | Top-left corner to bottom-right corner |
to bottom | 180deg | Top to bottom (the default) |
to left | 270deg | Right to left |
Frequently asked questions
Quick answers.
How do I create a CSS gradient?
Choose a type, edit the colors and angle, then copy the CSS from the code box and paste it into your stylesheet as the background of an element.
How do I add more than two colors?
Press Add stop. You can use up to 8 stops, and each one has its own color and position.
What is the difference between linear, radial and conic gradients?
Linear gradients blend along a line, radial gradients spread out from a center point, and conic gradients sweep around a center point.
How do I make a hard edge or stripes?
Give two neighboring stops the same position, for example one color at 50% and the next color also at 50%. The colors then change sharply instead of blending.
Do I need the -webkit- prefix?
No. Modern browsers support the standard syntax. If you want a solid color for very old browsers, turn on the fallback color line and it adds a background-color before the gradient.
Can I use a gradient on text or a border?
Yes. For text, use the gradient as the background with background-clip: text and a transparent text color. For borders, use border-image or a gradient background behind padded content. Copy the generated gradient value into those properties.
Can I download the gradient as an image?
Yes. Press Download PNG and choose a size. PNG export of conic gradients needs a recent version of Chrome, Edge, Firefox or Safari.
Is my data uploaded?
No. Everything runs in your browser and nothing is sent to a server.
More free tools from KickSolve
Related tools.