Get a colour palette from an image
Find the main colours of a photo or artwork and save them as a palette with HEX codes.
- Nothing is uploaded
- Works offline after first visit
- Open source
- No watermark · limit is your device’s memory; phones hold less
Extract a color palette from any image in your browser: the main colours, sized by how much of the picture they cover, with HEX codes. It is free, needs no account and adds no watermark, and your files are not uploaded: everything runs in your browser on your device. The size limit is your device’s memory, and phones hold less; give the page a short while after one visit to save itself for offline use, and then it works offline.
- HEX
#FFFFFF- RGB
rgb(255, 255, 255)- HSL
hsl(0, 0%, 100%)
Picked
Click or tap the image to keep a colour here.
Main colours in this image
Done
Open the network tab. Your files never appear in it.
Add files and run the tool to see every request this tab makes.
Your files are processed on this device and never sent to a server. Reload the page to clear everything from memory.
A good photo already has a colour scheme in it: the teal and rust of a harbour at dusk, the greens of a forest floor, the muted tones of a film still. Drop the image here and its main colours appear as a strip, each one as wide as the share of the picture it covers, with its HEX code on it.
The palette is found by clustering the image’s pixels (k-means, the standard method), with near-identical shades merged so you do not get three versions of the same sky. Choose between 4 and 12 colours: fewer for a bold scheme, more to catch small accents. The same image always gives the same palette.
Save palette downloads a PNG of the swatches, labelled with their codes, and a text list of HEX and RGB values to paste into CSS, Figma or a mood board. Everything runs in your browser; the image is not uploaded.
Each swatch carries a percentage: the share of the picture closest to that colour. That is useful when you build a scheme from a photo, because it tells you which colour should dominate and which should be used sparingly. A common approach is to take the largest swatch as the background, the next as the main surface, and one small, strong swatch as the accent for buttons or highlights.
For a logo or an illustration with a transparent background, the see-through area is left out, so the percentages describe only the artwork itself. A mostly flat graphic may give you fewer swatches than you asked for, because shades a person could not tell apart are merged into one. That is expected, not a fault. If you need exactly eight colours for a brief, lower the number or pick the missing shades by hand, and Save palette includes them.
How it works
- Drop a photo, painting, screenshot or design, or tap to pick one.
- Choose how many colours you want. The strip updates straight away.
- Click a swatch to see its values, then Save palette for a PNG and a list of codes.
In your browser, not on a server
Your browser decodes the image (libheif or the Squoosh decoders step in for HEIC, AVIF and JPEG XL) and draws it on a canvas in your tab. The colour under the cursor is read straight from that canvas, one pixel at a time, at up to 4096 pixels across, so a pick matches the file exactly. The main colours come from k-means clustering over a sample of about 20,000 pixels, run in the page with a fixed seed so the same image always gives the same palette.
Compared with upload-based tools: Colour pickers online upload the picture to show it back to you, which is a strange trade for a screenshot of a client’s unreleased design or a photo from your phone. Browser extensions that pick colours can read every page you visit. Here the image never leaves your device, and there is nothing to install.
Verify it yourself. Give the page a short while after one visit to save itself for offline use, then turn off Wi-Fi or switch to airplane mode and run the tool again. Or open your browser's developer tools (F12, or Cmd-Option-I on a Mac), pick the Network tab, and watch it while you convert. The panel above does the same count for you.
Questions
Why does a small bright detail not show up?
The palette favours colours that cover a real share of the image. Raise the number of colours to catch small accents, or click the detail on the image to pick it directly and add it to the saved palette.
Can I use the palette in my design tool?
Yes. Copy HEX or RGB values from the card, or save the palette and paste the list of codes. The PNG is handy for a mood board or a brief.
What do the percentages on each swatch mean?
How much of the picture is closer to that colour than to any other in the palette. They add up to about 100%. A very small share is still shown with enough width to read its code. Changing Main colours to find recalculates every share, because the picture is divided among more or fewer colours.
Why is the biggest colour a dull grey or beige?
Backgrounds, shadows and skies take up most of many photos, and the palette is sorted by how much each colour covers, not by how striking it is. Keep that swatch for backgrounds. For the vivid accent you noticed, click it on the image to pick it; picked colours are saved in their own row with the palette.
Is the file uploaded anywhere?
No. There is no server in this process. The page is a static file and the work is done by code running inside your browser tab. Give the page a short while after one visit to save itself for offline use; then you can turn off Wi-Fi and it still works.
More image tools
Color picker from image
Point at any pixel to get its HEX, RGB and HSL code, and see the main colours of the picture. The image stays on this device.
Compress & Resize Images
Make photos small enough to email or upload. Batch resize, set a quality, see the savings before you download.
Compress GIF
Make an animated GIF small enough for Discord, Slack, email or a web page. It is compressed on this device and never uploaded.
Compress PNG
Shrink PNG screenshots, logos and graphics while keeping them PNGs, transparency and all. Nothing is uploaded.
Other conversions
- PNG to JPG
- JPG to PNG
- WebP to PNG
- WebP to JPG
- PNG to WebP
- JPG to WebP
- AVIF to JPG
- AVIF to PNG
- SVG to PNG
- JXL to PNG
- Color picker from image
- HEX color from image
- Grayscale image
- Sepia filter
- Wi-Fi QR code generator
- vCard QR code generator
- UPC barcode generator
- Code 128 barcode generator
- Code 39 barcode generator
- ISBN barcode generator
- ITF-14 barcode generator
- EAN-13 barcode generator
Guides
- How to get a color code from an imageMatching a color you see in a photo needs an eyedropper, which most photo viewers do not have built in. Here is what actually gets the exact code.