Drop an image to get its main colors, sorted by how much of the image each one covers. Each color comes with its hex and RGB value (click to copy) and a share percentage, plus a CSS variables block you can paste into a stylesheet.

Two methods are available. k-means groups similar pixels into clusters and returns each cluster’s average, which tends to match the colors you actually see. Median cut repeatedly splits the color space at the median and is faster on huge palettes. The image is scaled down to about 120px before analysis, which is plenty for dominant colors and keeps it instant.

Click anywhere on the image to read the exact color of that pixel. Transparent pixels are ignored. Everything is computed locally in your browser.