The method is explained here: http://charlesleifer.com/blog/using-python-and-k-means-to-find-the-dominant-colors-in-images/ It uses KMeans to cluster pixels. The pixel value of the centroid of one cluster is the dominant color of that cluster. An image may have many dominant colors. The number...
This is a port to B4X of the original Color-Thief algorithm by Lokesh Dhakar as described here. I've included the original site pictures in the demo for comparison. I'm English so I have used the correct spelling of the word in its class name ;-) I needed a fully cross platform colour...