Image Color Counter
A 24-bit image can hold about 16.7 million distinct colours, and a photograph typically uses tens of thousands of them. Counting means reading every pixel and collecting the unique values, which is why a photo and a logo give wildly different answers.
How to count the colours in an image
Add your image
Drop a JPG, PNG or WebP onto the drop zone, or click to choose one.
Read the count
The number of distinct colours appears along with how many pixels were counted.
Loosen the match if you need to
Exact counts every value separately. The looser settings group near-identical shades, which is usually what you actually mean.
Copy the palette
The twelve most used colours are listed with hex codes and percentages, ready to copy.
Why use this tool
Exact or grouped counting
Count every distinct value, or round channels so that shades a person would call the same colour are counted together.
The twelve most used colours
Each with its hex code and the percentage of the image it covers, so you can see what actually dominates.
Transparency handled
Fully transparent pixels are skipped rather than counted as black, which would otherwise distort every result.
Colour density
Colours per thousand pixels, which tells you whether an image is photographic or flat far faster than the raw count does.
Runs entirely in your browser
Your image is never uploaded.
About this tool
A standard image stores eight bits for each of red, green and blue, which allows 16,777,216 possible colours. How many an individual image actually uses varies enormously. A flat logo might use four. A screenshot with anti-aliased text might use a few thousand. A photograph will often use tens or hundreds of thousands, because sensor noise and gradual lighting changes mean almost no two pixels land on exactly the same value.
That last point is why an exact count often surprises people. A photo that looks like it has maybe twenty colours can report 90,000, since every slight variation counts separately. The tolerance setting exists for that reason: it rounds each channel to a coarser step before counting, so shades a person would describe as the same colour collapse into one entry. Loosening the match is usually the honest answer to "how many colours is this".
The count is useful for practical decisions. Images with few distinct colours compress far better as PNG than as JPG, and are good candidates for indexed palettes or SVG conversion. Images with very high colour density are photographic and belong in a lossy format. The dominant colours list doubles as a quick palette extractor when you need brand colours out of an existing asset. For related work there is the image color palette extractor, the image color picker, and dither image for reducing colours deliberately.
Frequently asked questions
- How many colours can an image have?
- A standard 24-bit image allows 16,777,216 distinct colours, eight bits each for red, green and blue. Most images use a small fraction of that.
- Why does my photo report so many colours?
- Because sensor noise and gradual lighting shifts mean nearly every pixel differs slightly from its neighbours. Switch the match setting to Near or Loose to group shades that look identical.
- What counts as the same colour?
- On Exact, only identical values. The looser settings round each channel to a step of 8, 16 or 32, so colours within that distance are counted as one.
- Are transparent pixels counted?
- Fully transparent pixels are skipped, because counting them would add a colour that is not visible. Partly transparent pixels are counted by their colour value.
- What is a low colour count useful for?
- Images with few colours compress much better as PNG than JPG, and are good candidates for indexed palettes or tracing to SVG. A high count means the image is photographic and belongs in a lossy format.
- Is my image uploaded anywhere?
- No. The image is read in your browser and never leaves your device.
Related tools
Extract Color Palette from Image
Pull the dominant colors out of any photo as a palette of swatches with HEX and RGB codes, click to copy, or copy all as CSS variables.
Image Color Picker
Hover over an image to preview any pixel, click to save it, and copy HEX, RGB, and HSL values.
Dither Image
Turn a photo into a 1-bit or low-colour dithered image, live as you change the settings.
Image Histogram
See the tonal distribution of a photo, with clipping warnings and per-channel views.
Rotate & Flip Image
Rotate JPEG, PNG, and WebP images by 90 degrees or mirror them horizontally and vertically.
Image to Text
Pull the text out of a screenshot, scan, or photo. OCR that runs entirely in your browser.