Color Palette Extractor
List the five most common colors in a JPEG, PNG, WebP, AVIF, GIF, BMP, ICO, or HEIC image.
About this tool
Opaque pixels are sampled and grouped. The five largest groups are shown as hex colors. A color that appears only in a transparent pixel is skipped.
This is a frequency list, not a designed palette. Generate a harmony from one base color on the palette generator instead.
How to use it
- Choose an image. The type is read from the file bytes.
- Extract the palette.
- Copy a hex color. Transparent pixels are not counted.
Limitations
- The list is five buckets of opaque pixels, not every color in the file.
- Files over 250 MB or 40 million pixels are refused.
Five hex codes from a strided frequency count
Every fourth pixel, exact hex buckets
The extractor draws the decoded bitmap and walks the pixel buffer with a stride of sixteen bytes, which is every fourth pixel. Each visited pixel becomes a hex from its red, green, and blue. Alpha is ignored, so a nearly invisible pixel still votes with its stored color. Identical hex strings share a bucket. The buckets are sorted by count, and the first five become the palette. Ties keep the order the colors were first seen. This is not a perceptual clustering pass. Two creams that differ by one channel stay in two buckets and can crowd out a color you think of as more important. A photograph of a sunset can return five nearby oranges and omit a small blue sign, because the sign occupied fewer of the sampled pixels.
The result is text: five hex lines, plus swatches on the page. It is not an image file. The extractor has no quality control, and it does not re-encode the photo. The bitmap is only the sample source. GIF, ICO, and HEIC behave as their decoders do: one frame, the largest ICO image, the HEIC primary bitmap. A GIF that was already a 16-color graphic may return those colors faithfully if they dominate the stride. A JPEG of the same graphic may return several near-misses around each flat color, because the JPEG decode is not flat.
What you should not expect
There is no control for “five brand colors” or for ignoring near-white. A page with a white margin will often put white in the list, since white wins the count. Crop to the subject first if the margin should not vote. The stride can miss a one-pixel accent entirely. It can also hit it. Run it on the crop you care about, not on a contact sheet. The five lines are a histogram of sampled hex values, suitable for a quick read of dominant colors, not for generating a design system.
The photo stays where it was
Downloading the text does not modify the image. You can extract, then open the same file on a cropper or a converter. Nothing in this pass writes PNG or JPEG, so questions of quality, AVIF probes, and generation loss do not apply. If two runs disagree, you are probably on two different crops or two different decodes, not on a random seed. The walk is deterministic for a given bitmap.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

