Step 1 Start From a Preset (or Hit Random)
Click any of the presets under the tool to load it, or press Random until something catches your eye. You can change everything afterwards, so a preset is just a starting point.
CSS Gradient Generator
Stop 1 of 2
Move the last stop below 100% to see it repeat.
.gradient {
background: #577b27; /* fallback */
background: linear-gradient(135deg, #a3e635 0%, #0b0f19 100%);
} A CSS gradient is a smooth blend between two or more colors, drawn by the browser itself. You don’t need an image file: one line of CSS gives you a background that stays sharp on every screen, loads instantly and is easy to change later.
Gradients are images in CSS, so they go in background or
background-image, never in background-color. Each color in a gradient is called a
color stop: a color plus the spot where it should be at full strength. This generator lets
you drag those stops around and see the result live, then copy the finished CSS.
background: linear-gradient(90deg, #ff7e5f 0%, #feb47b 100%);Five quick steps. Everything happens in your browser and updates as you go.
Click any of the presets under the tool to load it, or press Random until something catches your eye. You can change everything afterwards, so a preset is just a starting point.
Choose Linear, Radial or Conic. The settings below change with it:
The bar under the preview shows every color stop as a little handle.
#a3e635, or lower the Opacity slider to fade it out.Tick Repeating to repeat your stops across the whole box (move the last stop below 100% to see it). Use Apply to above the preview to see your gradient on a box, on big text, or as a full-page background. The CSS output follows that choice.
linear-gradient(…) part, handy when you already have a rule.background shorthand and background-image + background-color.All three use the same color stops. Only the shape of the blend changes. Here’s each one with the exact CSS that draws it:
Colors change along a straight line. The angle sets the direction: 0deg goes up, 90deg to the right, 180deg down. Perfect for buttons, headers and page backgrounds.
background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%); Colors spread out from a center point, as a circle or an ellipse. Move the center to make a soft spotlight or a glow behind a card.
background: radial-gradient(circle at 50% 35%, #fde68a 0%, #f59e0b 40%, #7c2d12 100%); Colors sweep around a center point, like the hands of a clock. Great for color wheels, pie charts and loading spinners.
background: conic-gradient(#ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
The angle points to where the gradient ends. 0deg means bottom to top, and it turns clockwise from
there. You can also write keywords like to right, which is the same as 90deg.
0deg to top 90deg to right 180deg to bottom (default) 45deg to top right A few tricks that come up all the time:
Two stops at the same position make the color jump instead of blend.
linear-gradient(90deg, #a3e635 0%, #a3e635 50%, #0b0f19 50%, #0b0f19 100%) Hard stops that end at 10% and repeat, so they fill the whole box.
repeating-linear-gradient(45deg, #a3e635 0%, #a3e635 5%, #0b0f19 5%, #0b0f19 10%) Same color, opacity going from 100% to 0%. Nice over photos.
linear-gradient(90deg, #6366f1 0%, rgba(99, 102, 241, 0) 100%) The gradient shows only through the letters.
background-image: linear-gradient(90deg, #7f00ff 0%, #e100ff 50%, #f5576c 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent; linear-gradient and radial-gradient work in every browser
in use today, with no -webkit- prefix. conic-gradient works in Chrome, Edge, Firefox
and Safari (since 2020–2021).
background color line before the gradient.
Browsers that can’t draw the gradient skip it and keep the color. The tool picks the average color of your
gradient for you.
body a min-height: 100vh, otherwise a
short page only shows the top of the gradient and then repeats it.
background takes a comma-separated list, so you can stack several
gradients (with some transparent stops) on top of each other or over an image.
A smooth blend between two or more colors that the browser draws for you. You write it as a background image, for example background: linear-gradient(90deg, #ff7e5f, #feb47b). There’s no image file to download, it stays sharp at any size, and you can change it with one line of CSS.
A linear gradient changes color along a straight line, at the angle you choose. A radial gradient spreads out from a center point in a circle or an ellipse, like a glow. A conic gradient sweeps around a center point like the hands of a clock, which is great for color wheels and pie charts.
Both work, because a gradient is an image. The background shorthand is shorter but also resets background-color, background-size and the rest. Use background-image (plus background-color for the fallback) when the element already has other background settings you want to keep. Switch between both with the Output setting.
Put the gradient in background-image, then add background-clip: text (and -webkit-background-clip: text for Safari) and -webkit-text-fill-color: transparent. The background then only shows through the letters. Pick “Text” under Apply to and the tool writes all of that for you.
Give two stops the same position, for example #a3e635 50%, #0b0f19 50%. The color jumps instead of blending. That’s how stripes, flags and pie charts are made. In the tool, drag a stop exactly onto another or type the same position in the Position box.
repeating-linear-gradient (and the radial and conic versions) repeat your color stops over and over. It only makes a difference when the last stop is below 100%. For example stops at 0%, 5%, 5% and 10% give you thin stripes that fill the whole box. Try the Stripes preset.
Linear and radial gradients work in every browser in use today, with no -webkit- prefix needed. Conic gradients work in Chrome, Edge, Firefox and Safari since 2020–2021. The solid fallback line in the output covers anything older: browsers that don’t understand the gradient just show that color.
Only in your own browser. The last gradient you made is kept in localStorage so it’s still there when you come back. Nothing is uploaded, and there’s no account or signup.