Image

Image Colour Counter

Count the distinct colours in an image, see the most frequent ones with their share, and find out whether it would fit in a reduced palette format like PNG-8 or GIF.

Last reviewed by the Radiatus Cloud team

Drop an image here, click to browse, or paste one
Everything happens in your browser. Nothing is uploaded anywhere.
Preview appears here.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

Colour count decides which format is smallest

PNG can store an image as a palette of up to 256 colours with one byte per pixel, or as full colour with three bytes. An illustration using forty colours stored as full colour PNG is roughly three times larger than it needs to be, and converting it to a palette costs nothing in quality because every colour is preserved exactly. Knowing the count is what tells you whether that conversion is lossless or not.

Photographs have far more colours than people expect

A photograph typically contains tens or hundreds of thousands of distinct colours, most of them appearing only a handful of times, because sensor noise and compression produce slight variations across areas the eye reads as uniform. This is why palette formats are wrong for photographs and why the count alone is misleading: an image with 90,000 colours may still have 95 percent of its pixels covered by a few thousand of them.

JPEG creates colours that were never there

Saving a flat illustration as JPEG multiplies its colour count enormously, because the compression works in blocks and introduces slight variations around every edge. A logo with 12 colours can become one with 8,000 after a single JPEG save, and those extra colours are all artefacts. A high count on something that should be flat is a reliable sign the image has been through JPEG at some point.

Related tools

  • EXIF Viewer — Extract hidden EXIF data (Camera, GPS, Settings) from images.
  • Favicon Generator — Generate favicons and app icons at every required size from one source image, with the exact HTML to reference them.
  • Placeholder Image Generator — Generate placeholder images at any size with custom colours and label text. Produced in your browser as downloadable files, no external hotlinking.
  • Image Resizer — Resize images in your browser with aspect ratio control and format conversion. Files are processed locally and never uploaded.

Frequently Asked Questions

Why does my simple graphic have thousands of colours?

Almost certainly because it has been saved as JPEG at some point. JPEG works in blocks and introduces variations around every edge, so a logo with a dozen colours can come back with thousands, all of them artefacts.

When can I use a palette format?

When the image has 256 or fewer distinct colours, in which case PNG-8 stores it losslessly at roughly a third the size of full-colour PNG. Above that, converting means discarding colours.

Do photographs ever fit in 256 colours?

Not without visible loss. A photograph typically has tens or hundreds of thousands of distinct colours, and reducing to 256 produces banding unless dithering is applied, which trades the banding for noise.

Why do most colours appear only once?

Because sensor noise and compression create slight variations across areas that look uniform. That is why the count alone is misleading, and why the cumulative coverage figure matters more.

Does transparency count as a colour?

Semi-transparent pixels of the same colour at different opacities are distinct in the file. This tool counts opaque colour values and reports the transparent pixels separately, since they affect format choice differently.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Upload an image to count its distinct colours and see the most common ones.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.