Gradient Generator
Create CSS gradients visually.
Color stops
Drag a handle to move it, tap the bar to add a stop. Arrow keys nudge the selected stop, and Delete removes it.
Shape and blending
Presets
Code
background-image: linear-gradient(135deg, #ff9a44 0%, #fc6076 55%, #6a3093 100%);CSS gradient generator
Design a linear, radial or conic gradient with draggable color stops, then copy the CSS, a Tailwind class or a React style. Preview it as a fill, as text and in a small interface, and download a PNG when you need an image.
- Linear, radial and conic. Switch between the three CSS gradient types. Linear and conic have an angle dial you can drag, and radial and conic have a movable center.
- Draggable color stops. Drag a handle along the bar to move it, tap the bar to add a stop with the right blended color, or use the arrow keys for fine control. Up to ten stops.
- Opacity on each stop. Give any stop its own opacity to build fades and overlays. The preview sits on a checkerboard so you can see the transparency.
- Smooth blending in OKLCH. Standard gradients can turn gray and muddy in the middle, for example between blue and yellow. Smooth blend mixes the colors in OKLCH instead, which keeps midpoints bright, and adds a fallback line for older browsers.
- Repeating gradients. Turn on Repeating to tile the stops, which is how stripes and rings are made. Set the stops close together, such as 0% and 10%.
- Live preview in three views. See your gradient as a plain fill, as text, and on a small interface with a badge, progress bar and button, so you can judge it in context.
- Twelve presets and a random button. Start from a ready-made gradient, including a conic spectrum and a radial spotlight, or let Random pick harmonious colors and an angle.
- CSS, Tailwind, React and PNG. Copy the background-image line, a Tailwind arbitrary class or a React style prop, or download the gradient as a 1920 by 1080 PNG.
How CSS gradients are built
A gradient is a shape, a set of color stops and a way of mixing between them. Here is what each piece does.
- linear-gradient(). Colors run along a straight line. The angle sets the direction: 0deg goes bottom to top, 90deg goes left to right and 180deg goes top to bottom.
- radial-gradient(). Colors spread outward from a center point, as a circle or an ellipse that stretches to the box. The first stop is at the center.
- conic-gradient(). Colors sweep around a center point like a clock hand. Repeat the first color as the last stop to make a seamless color wheel.
- Color stops and positions. Each stop is a color and a position from 0% to 100%. Two stops at the same position create a hard edge instead of a blend.
- in oklch. Adding in oklch tells the browser how to mix between stops. It is supported in current Chrome, Safari and Firefox, so a plain line is written before it as a fallback.
Where gradients earn their place
- Hero and section backgrounds. Build a soft linear or radial background, copy one line of CSS and drop it on the section.
- Buttons and badges. Use a short angled gradient for a primary button, then check it in the Interface preview.
- Image overlays. Fade a dark color to transparent to keep text readable on top of a photo. Set the last stop to 0% opacity.
- Gradient text. Check how headings look in the Text preview, then use the same CSS with background-clip: text.
- Wallpapers and social images. Download the PNG for a phone wallpaper, a profile background or a presentation slide.
Gradient generator questions
How do I add another color to a gradient?
Tap anywhere on the stop bar, or press Add. The new stop takes the color the gradient already has at that point, so nothing jumps.
How do I make a gradient fade to transparent?
Select the last stop and set its Opacity to 0. The output switches to rgba() for that stop. For a cleaner fade, keep the same color on both stops and only change opacity.
Why does my gradient look gray in the middle?
Mixing two opposite colors in sRGB passes through gray. Turn on Smooth blend to mix in OKLCH, which stays more colorful.
How do I use the gradient in Tailwind?
Choose the Tailwind tab and paste the class onto your element. It uses an arbitrary value, so it works without any config changes.
How do I make a hard stripe instead of a blend?
Put two stops at the same position. The color changes instantly at that point. Combined with Repeating, this makes stripes.
Why is PNG disabled for some gradients?
Repeating gradients cannot be reproduced exactly by the image export, so the button is turned off for them. Copy the CSS instead.
Is anything uploaded?
No. The gradient is built and exported in your browser.