Palette reduction and pixel counting
The tool shrinks the image's full range of colors to a limited palette of representative colors, then assigns every pixel to its nearest representative. The winning color is the one whose bucket collects the most pixels; its percentage is that bucket's share of the total. Similar pixels land in the same bucket, so the reported color stands for a small range of shades, not one exact value.