How Color palette extractor works
Color Palette Extractor analyses your image and identifies the most visually dominant colours using a k-means clustering algorithm run against the pixel data in a Canvas. The result is a set of colour swatches with their HEX values that you can copy individually. No image bytes leave your browser; the pixel sampling runs locally in a Web Worker so the main thread stays responsive.
The extraction groups the hundreds of thousands of individual pixel colours into a smaller number of representative clusters. The number of output colours is configurable so you can extract a tight palette of five colours or a broader set of twelve. This is useful for quickly pulling brand colours from a logo, identifying the dominant tones of a photograph for a mood board, or checking what colours appear in a user-uploaded image.