How the colors are extracted
The image is uploaded and reduced on the server to a small working copy, 200 pixels on the longest side, which keeps the overall color balance while making the calculation quick. Similar pixels are then grouped into the number of colors you asked for using median cut quantization, refined with a couple of k-means passes so each group's color sits close to the pixels it represents.
Finally the groups are counted and sorted by how many pixels each covers. The first color is the dominant one and is marked with a star. Pixels that are more than half transparent are ignored, so a logo on a transparent background gives you the logo's colors, not a phantom black or white.
Choosing how many colors to extract
You can extract 4, 6, 8, 10 or 12 colors, starting at 8. A small number gives the broad strokes and merges nearby shades into one. A larger number brings out accents, highlights and shadows that cover less of the image. If the image genuinely has fewer distinct colors than you asked for, such as a two-color logo, you get fewer swatches rather than near-duplicates.
Using the extracted colors
Each swatch shows its HEX code. Click one to see it as RGB and HSL with copy buttons. Copy palette as CSS puts the whole set on your clipboard as custom properties in a :root block, numbered --color-1, --color-2 and so on in order of coverage, ready to paste into a stylesheet and rename to suit your project.
Typical uses include matching a slide deck or web page to a hero photo, pulling brand colors from an existing logo file, and finding complementary accents for a product shot.