Color Palette Generator from Image
Get a color palette from an image free — 2 to 12 dominant or distinct colors with HEX, RGB and HSL, an exact pixel color picker, and CSS, SCSS or JSON export.
Runs in your browserNothing uploadedFree · no signup
Drop an image here, or click to choosePNG, JPG or WebP. Analysed in your browser — never uploaded.
Frequently asked questions
- How does the tool decide which colors are in the palette?
- It counts every visible pixel into a fine histogram, moves those colors into Oklab — a color space where the straight-line distance between two colors matches how different they look — and groups them with k-means clustering, seeded by repeatedly splitting the most varied group at its best cut. Each swatch is the average of the pixels in its group, and the share next to it is how much of the picture that group covers. Working in Oklab rather than raw RGB is what stops it merging navy into black or splitting one sky into three nearly identical blues.
- What is the difference between Dominant and Distinct?
- Dominant gives the colors that cover the most area, which is what you want to match a photo's overall mood — but a large background soaks up the slots, so a big sky can come back as three shades of blue while a small red detail disappears. Distinct first breaks the image into about three times as many groups, then keeps the largest and adds whichever remaining color is furthest from those already chosen, weighted gently by size. A 1% accent gets its own swatch that way, and every pixel is then re-counted against the final colors so the shares still add up to 100%.
- Why is a palette color not exactly any pixel in my photo?
- Because each swatch is the average of thousands of similar pixels, it represents the area rather than any single point — the same reason a paint chip matched to a wall is not the color of one speck of it. If you need the exact value of one spot, such as a logo's brand color, use the picker below the palette: clicking the image reads that precise pixel at full resolution, not the scaled-down preview.
- Is my image uploaded to a server?
- No. The image is decoded and analysed on a canvas inside your own browser; there is no upload, no queue and no copy kept anywhere. That makes it safe for unreleased designs, client photos and screenshots you cannot share, and the page keeps working offline once it has loaded.