Replacing 24 bits with just 4 bits

This right image is created after passing the left image to the k-means algorithm to find the 16 centroids that can represent the colors of the left image.

mereduced.