The tool uses the median-cut algorithm: it repeatedly splits the image's color space along the axes of greatest variation and then, inside each group, returns the most frequent tone (the mode) rather than the average. Averaging would produce washed-out greys that do not exist in the image. Each color comes with the share of the image it covers.