What Is a Color Palette from Image?
A color palette from image tool analyzes any photograph or graphic and extracts its dominant colors into a usable palette. Designers use this to derive color schemes from inspiration images โ a sunset photograph becomes a warm palette, a forest scene becomes an earthy one, a product photo becomes a brand-aligned scheme.
This tool uses color quantization algorithms to sample and cluster the pixels in your image, identifying the most prominent hues. Upload any image, and the tool returns a clean palette with HEX, RGB, and HSL values ready to copy into your design tool or codebase.
How to Use This Tool
- Upload your image โ Drag and drop or click to upload any JPG, PNG, or WebP file. The tool displays a preview immediately.
- Review the extracted palette โ The tool analyzes the image and displays the dominant colors as swatches with their HEX, RGB, and HSL values.
- Adjust the palette size โ Increase or decrease the number of colors extracted to get a more detailed or more simplified palette.
- Export your palette โ Copy individual color codes, download the full palette as a GPL swatch file, or copy the values in your preferred format.
Worked example: the same image, run six times
The tool scales the image to at most 150 px, then groups the pixels with k-means clustering in RGB, starting from randomly chosen pixels. On October 12, 2026 we ran its k-means code six times on each of two images.
| Image | Palette returned (most common first) |
|---|---|
| Animation frame, 6 colours, run 1 | #2b3929 #5c6d2d #415345 #8d952f #dad43c #688067 |
| Same image, run 2 | #293629 #42523b #62732e #939932 #dad53d #5e7a66 (colours shift up to 17 RGB levels between runs) |
| Flat graphic with 3 colours, 6 requested | #f59e0b #1e3a8a #da2627 #5a4d67 plus two duplicate swatches at 0% |
- Results change between uploads. Because the starting points are random, re-uploading the same photo can return a slightly different palette (up to 17 levels per channel in our runs, enough to change a hex code). Save the palette you like instead of expecting to regenerate it.
- Ask for no more colours than the image has. With 6 colours on a 3-colour graphic, two clusters ended up empty and show as duplicate swatches at 0%. The fourth colour (
#5a4d67) is a blend from anti-aliased edges, not a real brand colour. - Clusters are formed in RGB. Distances in RGB do not match how different colours look, so two greens that look alike may be split while a subtle but distinct tone is merged. For a deterministic, perceptually ordered palette, the Image Color Extractor uses a fixed grid of colour buckets instead.
- Exports. HEX, RGB and HSL values, CSS variables, SCSS, a Tailwind config and a GIMP .gpl palette.
Sources
Checked on .
- Lloyd, S. (1982). Least squares quantization in PCM. IEEE Transactions on Information Theory (k-means)
- Celebi, M. E. (2023). Forty years of color quantization: a modern, algorithmic survey. Artificial Intelligence Review
- Arthur, D. and Vassilvitskii, S. (2007). k-means++: The Advantages of Careful Seeding. SODA '07
Related tools
- Extracted colors also drop straight into the duotone and halftone ink fields of the Photo Effects Lab for brand-colored print treatments.
Frequently Asked Questions
๐ Learn More
Related Article How to Extract Colors from Any Image โ Related Article Color Palette Guide: Build Better Schemes โBuilt by Derek Giordano ยท Part of Ultimate Design Tools