FREE ONLINE TOOLImages & design

Image color palette

Extract a sampled color palette from your images

Build a starting palette from a real image using downsampled pixels and quantized color groups. Export the resulting hexadecimal values as JSON or CSS variables.

  • No account needed
  • Practical guide included
  • Clear data boundaries
Image color palette
Private by design

Preparing your workspace…

Image color palette features and uses

Use the colors in an image as a starting point for a related visual treatment. The tool samples visible pixels, groups similar colors and returns swatches, hexadecimal values and CSS variables. It does not replace a deliberate brand or accessibility review.

Use sampled colors as a starting palette and test text against the backgrounds used in the real layout. A visually pleasing palette can still fail contrast requirements, and sampling does not identify a brand's official design tokens.

Continue this task with Color contrast checker and Social preview image maker.

Common uses

  • Find starting colors for an article illustration.
  • Build a draft interface palette around a photograph.
  • Export reusable CSS variables from sampled image colors.

How to use this tool

Follow these steps to prepare your input, run the tool and review its output.

  1. Choose a representative image

    Select a local raster image that contains the colors you want to explore. Transparent areas do not contribute equally to the sample.

  2. Choose the maximum group count

    Request five, eight or twelve groups and generate the palette. The tool can return fewer groups when the sample has fewer distinct buckets.

  3. Review swatches in context

    Compare the sample colors with the original, then copy the CSS variables or download the JSON report.

Example input and output

A deliberately simple two-color image.

Illustrative example
Starting input
100 × 100 opaque image
Left half: #ff0000
Right half: #0000ff
Maximum groups: 5
What to look for
Two returned color groups:
#ff0000 — 50% of the visible sample
#0000ff — 50% of the visible sample

Illustrative flat-color fixture; real photographs produce averaged groups, not an exhaustive list of original colors.

How to interpret the results

Sampling uses at most 160 by 160 pixels. Colors are grouped into four-bit-per-channel buckets, then averaged and ranked by sample frequency.

Percentages refer to visible sampled pixels. A limited set of returned groups may not account for every visible color in a complex image.

Before you use the result

  • Do not assume a sampled color pair passes contrast checks.
  • Compare colors at the actual UI size and background.
  • Mostly transparent pixels are skipped rather than treated as white.

Frequently asked questions

Answers about using this tool, interpreting its results and how it handles your data.

How we handle your data
Are the returned colors exact original pixel values?

Not necessarily. Nearby colors are grouped into quantized buckets and averaged. Flat-color artwork may retain exact values, while photographs usually produce representative colors.

Why can I receive fewer than five colors?

The selected count is a maximum. A simple or mostly transparent image may contain fewer eligible color groups in the sampled pixels.

Do the percentages describe every original pixel?

No. They describe the visible downsampled image. Pixels below 50% opacity are skipped, and the returned groups may omit less frequent colors.

Can I use the palette directly for accessible text?

Use it as a starting point, then test the actual foreground and background pair with a contrast checker. Sampling alone does not establish accessibility.

Can I process several images at once?

Yes. Choose or drop up to 20 images with a combined input size of 100 MB or less. The settings on this page apply to each image. Images run one at a time on your device, with a separate result or error for each file. Download successful outputs together as a ZIP. Remove individual files from the queue, or use Start over to clear the workspace. Per-image format, size and pixel limits still apply.

Is this tool free, and do I need to sign up?

This tool is free to use without an account or subscription. Supply your input in the workspace on this page, then run the tool. Your browser needs to support the features used by the tool; keep an original copy and review any generated output before applying it to a live website.

Are my files or text uploaded to your server?

This tool processes the supplied input locally in your browser. It does not upload your files or text to our server for processing. Copy or download the result you want to keep; the tool does not publish changes to your website automatically.