Generate Gradient from Image

Turn the colors of a photo into a gradient, then fine-tune it and copy the CSS or save it as an image

Upload a photo to build a gradient from its colors

Gradient Type
°
Color Stops
Type a code in any format, or a CSS color name
Preset Gradients
CSS Code

            
Tap the bar to add a color, drag a stop to move it, tap a stop twice to change its color

Image to Gradient: Make a Gradient From a Photo

Image to Gradient finds the main colors of a photo and turns them into a gradient that runs the way the colors do in the photo: a sunset sky over the sand becomes a gradient from top to bottom. Choose 2 to 6 colors and a mood, tap the photo to take an exact color, change the type and angle, then copy the CSS or save the gradient as an image. Your photo never leaves your device.

  • Free, no watermark
  • No sign-up
  • Photos never leave your device
  • Works on phone and computer

Before and After

Real Image to Gradient results. Drag the line to compare.

Desert dunes at sunset and the gradient made from themPhotoGradient

How to Make a Gradient From an Image

  1. 1 Add a Photo

    Upload or drop a photo, paste one with Ctrl+V, or try a sample. JPEG, PNG, WebP, GIF and HEIC all work.

  2. 2 Choose Colors and a Mood

    Take 2 to 6 colors, and choose a mood to say which ones count: Colorful, Bright, Muted, Deep, Dark or all colors.

  3. 3 Fine-Tune and Save

    Tap a stop and then the photo to take an exact color, change the type or the angle, then copy the CSS or save an image.

Gradients from the same photo with the Colorful, Bright and Muted moods

One Photo, Many Gradients

The mood decides which pixels count. Colorful, the default, skips greys and very light or dark pixels; Bright, Muted, Deep and Dark look for those tones. If too few pixels fit, the tool uses all the colors and tells you.

The same photo as a gradient of 2 colors and of 6

2 to 6 Colors

Two colors give a simple blend; six follow the photo more closely. Each color is placed where it sits in the photo, at least a little apart from its neighbors.

Colors from a photo as a linear, a radial and a conic gradient

Any Type, Any Angle

The photo gives a linear gradient. Switch it to radial or conic, change the angle, or add colors up to 10, and the colors you took stay.

Image to Gradient at a Glance

Colors from the photo2 to 6, then up to 10 stops
MoodsColorful, Bright, Muted, Deep, Dark or All Colors
DirectionFollows the colors in the photo, in steps of 45 degrees
CSSA standard gradient after a solid fallback color, with no vendor prefixes
Image sizes1920 × 1080, 3840 × 2160, 1080 × 1080, 1080 × 1350, 1080 × 1920 and 1200 × 630
Image formatsPNG, JPG, WebP or SVG (a conic gradient cannot be saved as SVG)
PriceFree, with no watermark and no sign-up
Photo formatsJPEG, PNG, WebP, GIF, HEIC and other images your browser opens
Where it runsIn your browser; nothing is uploaded

Updated November 25, 2026

Frequently Asked Questions

How does the tool find the colors?

It shrinks a copy of the photo to 240 pixels on its longest side, groups the pixels by color, and finds the main colors with k-means clustering, counting only the pixels that fit the mood. Each stop is the average of one group, so it may not match any single pixel; tap the photo to set a stop to an exact pixel.

How does it choose the direction?

It looks at where each color sits in the photo. When they are spread out, the gradient runs between the two colors farthest apart, in steps of 45 degrees, and each stop sits where its color is. When the colors are mixed all over, it runs from light at the top to dark at the bottom.

Can I make a radial or conic gradient from a photo?

Yes. The photo gives a linear gradient; switch the type to radial or conic and the colors stay. You can also change the angle, move the stops, and add colors up to 10.

What image formats are supported for gradient extraction?

JPG, PNG, WebP, GIF and BMP, and HEIC photos from an iPhone, which are converted in your browser. Photos with clear areas of color give the most striking gradients.

Can I save or export my gradient designs?

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.

Is my photo uploaded?

No. The colors are found in your browser, so the photo never leaves your device.

Can I use the gradients in commercial work?

Yes. Our terms allow personal and commercial use of the tool, and the saved image carries no watermark. If you make a gradient from a photo, make sure you may use that photo.

Turn Your Photo Into a Gradient