Pillow - The python Image Processing Library provides histogram() method in the Image class to get a histogram of colors/bands present in the Image.
histogram() method provides a list of counts of pixels for each color.eg., Red, Blue, Green for an Image of mode "RGB"