Skip to content
Tooletto

Color Palette Extractor

Extract the dominant colors from a photo or design as a palette, with HEX and RGB values and the share of the image each color covers. Useful for matching a brand or building a theme.

  • Files never leave your device
  • Free, no signup
  • No watermarks
  • Works offline once loaded
Loading tool…

How to color palette extractor

  1. 1

    Add an image

    Drop a photo, screenshot or design in — or paste from the clipboard.

  2. 2

    Choose how many colors

    Five or six is usually the sweet spot for a usable palette.

  3. 3

    Copy the values

    Each swatch gives HEX and RGB, plus how much of the image it covers.

How median-cut quantisation picks the colors

A typical photograph contains hundreds of thousands of distinct colors once every subtle gradient and shadow is counted individually, far more than any usable palette could show. Median-cut quantisation reduces that down by treating all of an image's pixels as points in a three-dimensional color space, then repeatedly splitting the largest, most spread-out group along whichever axis — red, green or blue — has the widest range, until the requested number of groups remain. Each final group's average color becomes one swatch in the palette.

Because the splitting is driven by how spread out a group of colors is rather than by how many pixels are in it, the result naturally favours colors that are both common and visually distinct, rather than just the single most frequent pixel value — a large area of near-identical sky blue does not crowd out three other genuinely different colors that each cover a smaller area. This is the same core algorithm behind GIF and classic 256-color palette generation, applied here to build a palette for design use rather than to redraw the image itself.

Why the palette can look nothing like what you expected

Human attention is drawn to the subject of a photograph — a face, a product, a focal object — almost regardless of how much of the frame it actually occupies, while a pixel-counting algorithm has no concept of a subject at all. A portrait shot against a large expanse of green foliage will return a palette dominated by greens, because green genuinely is the majority of the pixels, even though a person looking at the photo would say it is "about" the person in the frame, not the background behind them.

The fix, when this happens, is almost always to crop the image to the region that actually matters before extracting the palette — cropping tightly to a product photo's subject, or to a design mockup's focal element, removes the background pixels that were skewing the result and lets the palette reflect the part of the image the palette is actually meant to represent.

Choosing how many colors to extract

Fewer colors force the algorithm to generalise more aggressively, which is useful when the palette is going to be used as a small, deliberate brand or theme palette — three or four colors that each need to be genuinely distinct from one another. More colors capture finer distinctions in the source image but start producing near-duplicate swatches that are hard to tell apart once the count goes much past six or seven, particularly on images with subtle gradients where the extra swatches are really just steps along the same gradient rather than meaningfully different colors.

3–4 colors
A tight brand palette — primary, secondary, and one or two accents.
5–6 colors
The general-purpose default. Enough range without near-duplicates.
8+ colors
Detailed analysis of a complex image, at the cost of some redundancy between swatches.

Frequently asked questions

How are the colors chosen?

By median-cut quantisation — the image's colors are repeatedly split into boxes along their widest axis until the requested number of groups remain, and each group's weighted average becomes a swatch. It is the same algorithm GIF palettes use, and it favours colors by both how distinct and how common they are.

Why is the palette different from what I see?

Because the eye is drawn to the *subject*, while the algorithm counts pixels. A photo of a red car on grass returns mostly greens, since that is genuinely most of the image. Cropping to the part you care about gives the palette you expected.

What does the percentage mean?

The share of pixels assigned to that swatch. It is a good proxy for visual weight — a color covering 40% of the image will dominate any design built from the palette, so it usually belongs as a background rather than an accent.

Are transparent areas included?

No. Fully transparent pixels are excluded, so a logo on a transparent background returns the logo's colors rather than being dragged toward black.

Common color palette extractor tasks