All tools run in your browser — your files never leave your device.
All tools154

Design & SEO

Color Picker from Image

Pull any color out of a photo and build a palette from it.

What it does. A color picker from an image samples the exact color of any pixel you click and can extract a palette of the image’s dominant colors. This tool uses median-cut quantization to find those dominants, and outputs HEX, RGB and HSL for each. The image is read locally and never uploaded.
Runs in your browserNothing uploadsNo signupWorks offline

How to use Color Picker from Image

  1. Drop an image onto the canvas.
  2. Click or drag anywhere on the image to sample a pixel — the magnifier shows the exact color under the cursor.
  3. Read the auto-generated dominant color palette below, and click any swatch to copy it.

How does dominant color extraction work?

By median-cut quantization, the same algorithm that reduced photographs to 256-color GIFs in the 1990s.

Every pixel is a point in a three-dimensional RGB space. The algorithm puts all of them in one box, finds the axis along which the colors are most spread out, and splits the box at the median value along that axis. It then repeats on the resulting boxes, always splitting the one with the greatest spread, until it has as many boxes as you asked for colors. The average of each box becomes a palette entry.

Median cut is used rather than simple frequency counting because frequency alone gives poor results: photographs contain thousands of near-identical shades, so the top six most-common colors in a landscape are usually six barely distinguishable blues. Median cut guarantees the palette spans the image’s actual color range.

What is the difference between dominant and average color?

Average color is the arithmetic mean of every pixel, and it is almost always a disappointing brown-grey. Averaging a vivid red sunset against a deep blue sea gives you mud, because opposite hues cancel.

Dominant colors are the colors actually present in significant quantity. A palette of six dominants from that same sunset gives you the orange, the deep blue, the pink and the near-black — which is what a person would describe if you asked them the colors in the photo.

The average is occasionally useful as a placeholder background while an image loads, since it minimizes the perceived flash. For anything else — building a brand palette, matching a UI to a hero image, picking a theme color — use the dominants.

Why does the picked color look different from what I see?

Three reasons, and all three are worth understanding if you are matching colors precisely.

The first is JPEG compression. Chroma subsampling stores color at half resolution, so pixels near a hard color boundary carry averaged values that appear in neither original region. Sample from the middle of a flat area rather than near an edge.

The second is your display profile. A wide-gamut monitor renders sRGB values more saturated than a standard one, so the color you see is not the color in the file. The sampled value is the file’s value, which is the correct one to use.

The third is simultaneous contrast — a perceptual effect where surrounding colors shift how a color appears. A grey square looks warm on a blue background and cool on an orange one. The eyedropper reports the actual pixel value, which can genuinely differ from your perception of it.

How many colors should a palette have?

For a brand or interface palette, five to seven works: one or two primaries, one accent, and two or three neutrals. Beyond about eight, the colors stop being individually memorable and the system becomes hard to apply consistently.

For matching a UI to a specific image — a music player themed to album art, a product page themed to a photo — three is usually enough: a dominant for the background, a contrasting one for text, and an accent.

Whatever you extract, check the contrast before using it. Two colors pulled from the same photograph frequently sit at similar luminance, which looks harmonious and fails WCAG AA badly when used as text on background. Run the pair through the Color Converter to check the ratio.

Frequently asked questions

Can I pick a color from a website rather than an image?

Take a screenshot and drop it here. Browsers do not allow a page to read pixels from another site for security reasons.

What formats can I copy?

HEX, RGB, HSL and OKLCH for every sampled color and every palette swatch.

Does it work on transparent PNGs?

Yes. Transparent pixels are reported as such rather than as the checkerboard color, and are excluded from palette extraction.

Why are two swatches nearly identical?

The image genuinely contains two close but distinct dominant regions. Reduce the palette size and the algorithm will merge them.

Can I sample an average of an area rather than one pixel?

Yes. The sample size control averages over a 3×3, 5×5 or 11×11 region, which is the right approach for noisy or compressed images.

Does it work with screenshots of video?

Yes, though video compression is more aggressive than JPEG, so sample from flat areas for accuracy.

Is my image uploaded?

No. The image is drawn to a canvas in this page and pixels are read with getImageData locally.

Guides for Color Picker from Image