The tool uses the open-source Color Thief library. It samples pixels across the image and groups similar colours together, then reports a representative colour for each of the eight largest groups. The result reflects how much of the picture each colour covers, not how eye-catching it is, so a small red flower on a large green field may not make the list.
Because pixels are sampled rather than every one being counted, very small details can be skipped. Running it twice on the same image gives the same result.