Counting image colors

Sometimes it is useful to know the number of colors in an image and many programs are able to count them. But Photoshop remains an exception until you install the filter SF NumberOfColors.

SF Farbanzahl


The NumberOfColors Plugin combined with a true-color test image is able to deliver information about "color loss" caused by conversions between color spaces but also during image processing. Try converting an image into Lab or CMYK space and back and count the number of colors that "survived" the process - the result will be quite disillusioning. After that, you surely will think twice before using Lab space again, at least when working in 8 bit Lab. When changing the test image's mode to 16 bit before converting it into Lab (and to 8 bit again after you convert back from Lab), the color loss will be marginal.

Image processing tools and layer fill modes that use other color models than RGB (like Hue/Saturation or the fill modes Hue, Saturation, Color and Luminance) also reduce the number of colors in an image. In some programs this happens as soon as you call up the dialog box Hue/Saturation and click OK without changing anything.

SF NumberOfColors (120 KB)
Plugin for Photoshop and compatible programs (Windows only)
Including true-color test image containing 16.7 million colors.

The SF NumberOfColors plugin and the true-color test image are Freeware and can therefore be copied and distributed freely as long as no charges are being taken.

True-color image

The Plugin comes with an RGB image containing all possible 16,777,216 colors. It consists of one pixel per color and therefore is quite large, resulting in an uncompressed file size of more than 50 MB. But there is no reason to panic: Because the file is structured in a quite regular way, it can be compressed very effectively, so the download will not take long.