How to use Palette Generator
- Drop an image
- Choose how many colors to extract
- Copy the codes, or download the palette as an image or CSS variables
About this tool
The generator downsamples the image and groups similar pixels with k-means clustering, then sorts the clusters by how much of the image they cover. Try 5–6 colors for a balanced brand palette, or more for illustrations with many hues.
Frequently asked questions
How are the colors chosen?
Pixels are grouped into clusters of similar color, and each cluster’s average becomes a palette color. Larger clusters are listed first.
Why do I get slightly different colors each time I change the count?
Clustering adapts to the number of groups, so asking for more colors splits large areas into finer shades.
Can I export the palette?
Yes, as a PNG swatch strip, as CSS custom properties, or by copying individual HEX codes.
Are my files uploaded to a server?
No. ConvertBrightly processes files with JavaScript inside your browser. Nothing is sent over the network, and the files disappear when you close the tab. You can even disconnect from the internet after the page loads.
Related tools
Updated · Built by the ConvertBrightly team · How our tools work · Report a problem
More details and reference
Worked example
A sunset photo with 6 colors might give dark navy, purple, two oranges, a pale yellow and near-black, each with its HEX code and the share of the image it covers.
Tips, limits and common mistakes
- Colors are grouped by similarity (clustering), so asking for more colors splits large groups into similar shades.
- Small but important accents can be missed when they cover only a few pixels. Use the Color Picker for those.
- Check text contrast before using palette colors for text and backgrounds.
How we check this page
Files are processed in your browser with the open-source libraries listed on our About page, following the format standards listed in our sources and methodology. This page was last reviewed in October 2026. If a file does not come out as expected, tell us about it.
All Image Tools (29)
Image Converter · Remove Background · Blur Background · Blur Image · Blur Faces · Compress Image · Resize Image · Crop Image · Rotate & Flip Image · HEIC to JPG · SVG to PNG · Favicon Generator · EXIF Viewer · Remove EXIF Data · Images to GIF · Image to Base64 · Watermark Image · Round Image Corners · Add Border to Image · Color Picker from Image · Instagram Grid Splitter · Social Media Image Resizer · Meme Maker · Passport & ID Photo Resizer · DPI Changer · Black & White / Sepia · Brightness & Contrast · Combine Images · Image Tools hub