Generate a colour palette from an image online
Pull a handful of representative colours out of a photo or design, as hex codes you can drop straight into CSS or a design tool. Add your images, choose how many colours, and download a swatch strip plus a text list for each.
This groups similar colours together with median-cut quantization — the same family of algorithm most palette tools use — rather than just picking the most literal individual pixels, which tends to produce a palette that actually looks like the image rather than a handful of near-duplicate shades.
Your images never leave your device. The extraction runs entirely in your browser, so nothing is uploaded, stored, or scanned, and a batch costs no more than a single file.
or drop them here — nothing is uploaded
How to image palette generator
Add your images
Drop JPG, PNG, or WebP files into the box, or click to browse.
Choose how many colours
Six is a good default for most photos. Fewer gives a bolder, simpler palette; more captures subtler variation.
Generate and download
Press Image Palette Generator. A swatch-strip image and a hex-code list download for each image.
Frequently asked questions
Are my images uploaded anywhere?
No. The extraction runs in your browser using JavaScript, so your files stay on your device. You can confirm this by opening your browser devtools Network tab while working — there are no upload requests.
How are the colours chosen?
Through median-cut quantization: the image's pixels are repeatedly split into groups by their widest colour range, until there are as many groups as colours requested, and each group's pixels are averaged into one representative colour. This tends to produce colours that actually look like meaningful regions of the photo, rather than whichever exact pixel values happened to be most common.
What do I get in the download?
A small PNG showing the colours as solid blocks side by side, and a text file listing each one as both a hex code and an rgb() value, in the order the palette weighted them most to least represented.
Does image size affect the result?
Barely — the image is sampled at a reduced size internally before extraction, since colour distribution does not meaningfully change at full resolution. A 40-megapixel photo and a small thumbnail of the same picture return essentially the same palette.
What happens with a transparent PNG?
Mostly-transparent pixels are excluded from the count, so the palette reflects the visible colours in the image rather than being skewed toward whatever the transparent background happens to render as.
Is there a limit on how many files?
Thirty at a time, which is a limit of your device rather than our policy — everything is held in memory while it works.