Create smooth transitions between two or more colors with directional control and live preview
Upload a photo to build a gradient from its colors
The CSS Gradient Generator makes linear, radial and conic gradients with 2 to 10 colors. Drag the color stops along the bar, set the angle or the center, or start from one of 12 presets or a random gradient. Copy the CSS, with a solid fallback color, or save the gradient as a PNG, JPG, WebP or SVG image up to 4K. You can also make a gradient from the colors of a photo. Free, in your browser.
Choose linear, radial or conic, start from one of the 12 presets, press Random, or add a photo to take its colors.
Click the bar under the preview to add a color, drag the stops to move them, and type any color code. Set the angle, or drag the center of a radial or conic gradient.
Copy the CSS for your stylesheet, or choose a size and save the gradient as a PNG, JPG, WebP or SVG image.
A linear gradient runs in a straight line at any angle, a radial one spreads out from a center as a circle or an ellipse, and a conic one turns around a center like a color wheel. Drag the center of a radial or conic gradient anywhere on the preview.
Start from a preset such as Sunset, Ocean or Color Wheel, or press Random for 2 to 4 colors a step apart on the color wheel, neither grey nor too dark or light. Reverse flips the colors.

BeforeAfterAdd a photo and the tool turns its main colors into a gradient that runs the way they do in the photo, such as a sunset sky down to the sand. Tap a stop, then the photo, to take an exact color.
| Types | Linear, radial (circle or ellipse) and conic |
|---|---|
| Colors | 2 to 10 stops |
| Presets | 12, plus Random |
| CSS | A standard gradient after a solid fallback color, with no vendor prefixes |
| Image sizes | 1920 × 1080, 3840 × 2160, 1080 × 1080, 1080 × 1350, 1080 × 1920 and 1200 × 630 |
| Image formats | PNG, JPG, WebP or SVG (a conic gradient cannot be saved as SVG) |
| Price | Free, with no watermark and no sign-up |
| Photo formats | JPEG, PNG, WebP, GIF, HEIC and other images your browser opens |
| Where it runs | In your browser; nothing is uploaded |
Updated November 25, 2026
A linear gradient changes color along a straight line, at any angle: good for backgrounds, bars and buttons. A radial gradient spreads out from a center point as a circle or an ellipse, like a spotlight or a glow. A conic gradient turns around a center point like the hands of a clock, for color wheels and pie-like designs.
Click Add Color, or click the bar under the preview: a new stop appears there in the color the gradient already has, so nothing jumps. Drag a stop along the bar to move it or type its position, and set its color with the swatch or a code in any format. A gradient takes 2 to 10 colors; the × removes one.
Yes. Linear, radial and conic gradients work without prefixes in every current browser: Chrome, Edge, Firefox, Safari and their mobile versions. The CSS starts with a solid color, the gradient's average, so a very old browser that cannot draw gradients still shows a matching background.
Copy the CSS, or save the gradient as an image: PNG, JPG, WebP or SVG, in six sizes from 1200 × 630 to 4K (3840 × 2160), for wallpapers, slides and social posts. The image is drawn with the same geometry as the CSS, so it matches the preview. SVG cannot hold a conic gradient, so a conic one saves as PNG, JPG or WebP.
For a linear gradient, drag the angle slider, type the degrees (0-359) or use the eight arrows: 0° runs from bottom to top, 90° from left to right. For a conic gradient the angle sets where the colors start. For radial and conic gradients, drag the center point on the preview, or move it with the arrow keys; a radial gradient can be a circle or an ellipse.
Yes. Upload a photo and the tool builds a gradient from its main colors, laid in the direction they lie in the photo: a sky above the sea gives a top-to-bottom gradient. Then tap a stop and tap the photo to pick its color exactly; the next stop is chosen for you.
Use colors of similar brightness, or add an in-between color between two contrasting hues so the middle does not turn gray. Space the stops evenly for a smooth blend, or put two stops at the same position for a hard edge.