Skip to main content
CompressNConvert

Image Color Extractor

Extract a color palette from a photo, logo, or screenshot in your browser. Sample image pixels, copy HEX colors, and export the palette as design tokens.

Runs locally in your browser

Drop an image here

JPG, PNG, WebP, AVIF, GIF, or SVG. The file is read on this device and never uploaded.

Settings

Load an image to extract a palette.

Complete tool guide

Image Color Extractor guide

Extract a representative color palette from a photo, screenshot, or logo using local browser processing. The tool clusters sampled pixels in Oklab, ranks colors by their share of those samples, and lets you inspect individual pixels from the loaded image.

Your input is processed in the current browser tab and is not sent to the application server.

Why use this tool?

  • Turn image colors into reusable HEX values and palette exports.
  • Distinguish large background regions from smaller accent colors.
  • Sample a specific image pixel separately from the clustered palette.

Common use cases

  • Building a site palette from a hero photograph
  • Matching an interface to a client logo or product shot
  • Pulling brand colors out of a screenshot you cannot get source files for
  • Generating a background color that suits a specific image

How to use it

  1. 1

    Drop in an image, or choose a file from your device.

  2. 2

    Set how many colors you want in the palette.

  3. 3

    Hover or click anywhere on the image to sample an exact pixel.

  4. 4

    Copy an individual swatch, or export the whole palette as tokens.

Controls and results explained

Color count

Choose how many representative colors to request. A nearly uniform image can contain fewer useful distinct colors than a detailed photograph.

Swatch percentages

Percentages describe clusters among retained sampled pixels. They are not visual-importance scores or exact counts of original HEX values.

Pixel sampler

Hover or select an image position to read the decoded full-resolution pixel. This result can differ from a nearby palette centroid.

Worked examples

Extract from a solid red image

Start with: A fully opaque image filled with #FF0000

  1. Load the image and request a small palette.
  2. Inspect the dominant swatch and sample an interior pixel.
Dominant color: #FF0000
Sampled interior pixel: #FF0000

With uniform opaque sRGB input, clustering and pixel sampling agree. A real photograph usually contains many nearby values.

Separate a dominant background from an accent

Start with: An opaque test image with 75% blue #0000FF and 25% yellow #FFFF00

  1. Load the image and request two colors.
  2. Compare the swatch percentages with a pixel sampled inside each region.
Blue: approximately 75%
Yellow: approximately 25%

The percentages depend on downsampling at the boundary. A smaller yellow region can still be the useful accent; area is not a recommendation for semantic importance.

Palette versus pixel color

Palette swatches summarize groups of similar sampled pixels. Use the sampler when you need the color of a particular logo region rather than an average of neighboring colors.

Sampling and transparency

Clustering uses a downscaled image for speed and ignores pixels with alpha below 125 out of 255. Retained pixels are clustered by color; percentages are not a measure of the entire transparent canvas.

Reproducibility

Clustering uses deterministic starting positions. The same decoded pixels and settings produce repeatable results, but image decoding and color management can differ between environments.

Practical tips for better results

  • Ask for more colors than you need, then discard the ones that are too similar.
  • The most useful accent is often a small-percentage swatch, not the dominant one.
  • Check any extracted pair with the contrast checker before using it for text.

Frequently asked questions

Can I get exact brand colors from a screenshot?

Sample a flat interior region for the decoded pixel value. Scaling, compression, transparency, and color management can change it from the original source token.

Is my image uploaded to extract colors?

No. The image is decoded and processed in the current browser tab. It is not uploaded to an application server for extraction.

Why does the palette miss a small accent?

Large regions can dominate clustering, and downsampling can reduce tiny features. Increase the color count or crop the source image around the area of interest before loading it.

What to check before using the result

  • Supported files depend on the browser’s image decoder. Not every file selected through image/* can necessarily be decoded.
  • A clustered palette is not an accessibility assessment or a color-managed print specification.

Keep working

Continue with another focused tool from the same collection.