To find the most dominant colours in an image, we can do this by using K-Means clusturing algorithm. The main role of the K-means algorithm is that it will collect all the pixcels of same colour into a cluster and group all the clusters in a set.
Go to the terminal and change your directory to the file where most_dominant_color.py , utils.py and some images are kept.
Run this command to get the output $ python most_dominant_color.py -–image imagefilename.jpg -–clusters 5