Colour palette extractor
Pull a colour palette out of a photo, a screenshot, a logo or artwork. Choose an image and how many colours you want, and the extractor samples the pixels, groups similar colours with k-means clustering and returns the dominant colours sorted by how much of the image each one covers. You get HEX and RGB values, a proportional colour bar, a one-click list of HEX codes and CSS custom properties to paste into a stylesheet. Transparent pixels are ignored, and the same image always gives the same palette.
How to use the Color Palette Extractor
- 1
Choose an image
A photo, screenshot, logo or illustration.
- 2
Set the number of colours
From 1 to 16.
- 3
Copy the palette
HEX list or CSS variables.
How colours are found
The image is scaled down and up to 40,000 pixels are sampled. They are clustered in RGB space with k-means (k-means++ start, fixed seed). Each cluster’s average colour is a palette colour; its share is the fraction of sampled pixels in the cluster.
When to use it
- Build a website colour scheme from a brand photo.
- Match a design to a client’s logo.
- Find paint or fabric colours from a picture.
Limits
- Dominant colours are averages, so small but important accents may merge into bigger areas; ask for more colours to separate them.
- Screen colours are sRGB; printed colours will differ.
Privacy
Your image is processed in your browser and never uploaded.
Frequently asked questions
How many colours should I extract?
Five or six usually give a useful palette. Ask for more to catch smaller accent colours.
Why is a colour slightly different from the pixel I picked?
Each palette colour is the average of many similar pixels, which smooths out noise and shading.
Does it work with PNG transparency?
Yes. Mostly transparent pixels are skipped, so a logo on a transparent background gives the logo colours.
Can I get these colours as a scale?
Copy a colour into the Color Palette Generator or Design System Generator to build 50–950 shades.
Is it accurate for print?
It reports screen (sRGB) colours. For print, convert with your printer’s colour profile.
Related tools
- Color Palette GeneratorColour harmonies and a 50–950 tint and shade scale from one base colour, ready for CSS or Tailwind.
- Colour Converter & Contrast CheckerConvert colour codes and check WCAG text contrast.
- Design System GeneratorTurn brand colours, fonts and a few numbers into a complete set of design tokens.
People also use
Last updated November 24, 2026 · How we build and test our tools