WMW

Get Colors Image

Free

Extract a dominant color palette from an image using median-cut quantization, with copy as hex or CSS variables.

Runs entirely in your browser. Your image is never uploaded anywhere.

Click to choose an image, or drag and drop one here

Recent Activity

Visible to everyone. Last 20 uses across all visitors, newest first.

No activity yet. Be the first.

Comments (0)

Found this tool useful? Leave a comment, share a tip, or tell us how we can make it better.

Guest comments are reviewed before publishing. Sign in to post instantly.

No comments yet. Be the first to share your thoughts!

What this tool does

Extracts a dominant color palette from any image using median-cut color quantization, the same technique used by popular palette-extraction libraries, with an adjustable number of colors and one-click copying as hex codes or CSS variables.

How It Works

All of the image's pixels start in a single group. The tool finds whichever color channel (red, green, or blue) has the widest range of values within the most populous group, sorts that group's pixels along that channel, and splits it in half at the median so both halves contain roughly the same number of pixels. This splitting repeats, always targeting the group with the most pixels, until there are as many groups as the number of colors you requested. Each final group is then reduced to a single color by averaging its pixels, and the resulting colors are sorted with the most common (largest group) first.

Problems it solves

Frequently asked questions

How does this tool pick which colors matter most in my image?

It uses a technique called median-cut quantization: it treats every pixel's color as a point in 3D red/green/blue space, repeatedly splits the most populous group of colors in half along whichever color channel varies the most within it, and once it has as many groups as colors you requested, averages each group into one representative color. Groups with more pixels come first in the results, so the palette reflects how much of the image each color actually covers.

Why is this smarter than just averaging the whole image into one color?

Averaging everything at once would blend a photo with distinct red and blue areas into a muddy purple that appears nowhere in the original. By splitting the color space into separate groups before averaging, each group only contains similar colors, so red areas and blue areas stay represented as their own separate, recognizable palette entries instead of canceling each other out.

Why might the extracted palette miss a color I can clearly see in the photo?

If that color only covers a small area of the image, it may end up folded into a larger, more dominant group rather than getting its own slot, especially at lower color counts. Increasing the number of colors requested gives small or subtle color areas a better chance of being split out into their own palette entry.

Does this analyze the full-resolution image?

The image is first downscaled to a smaller working copy before analysis, since palette extraction only needs a representative sample of colors, not every pixel, and this keeps the tool fast even on large photos. This does not affect the image itself, only the analysis, nothing is uploaded and the original file is never modified.

Can I use the palette in my CSS?

Yes, click "Copy as CSS Variables" to copy the palette as ready-to-paste --color-1 through --color-N custom properties, or "Copy as HEX List" for a plain list of hex codes.

Related Tools