Cat Toolbox
Help CatBlog About Partnership 中文

Color Extractor

Upload images to automatically extract dominant colors using K-means++ clustering algorithm and generate palettes.

🖼
Upload Image
Click to select an image or drag it here · Supports PNG / JPG / WebP
Uploaded image preview
Analyzing image colors...

Upload an image to start extracting color schemes

FAQ

How does the color extractor extract colors from images?
We use the K-means++ clustering algorithm to analyze image pixels. First, we extract all opaque pixels (Alpha >= 128), then initialize cluster centers using K-means++, iterate 12 rounds to optimize clustering results, merge similar colors (Euclidean distance < 24) and suppress low-saturation background colors, and finally output dominant colors sorted by a combined score of frequency and saturation.

Can I adjust the number of extracted colors?
Yes. After uploading an image, you can adjust the number of extracted colors using a slider, ranging from 5 to 9 dominant colors. The system will recalculate and update the palette in real-time.

Will my images be uploaded to the server?
No. All processing is done in your browser using the Canvas API to read pixel data. Images are never uploaded to any server, protecting your privacy and security.

Related guide

Color Converter, Palette Extractor and Gradient Builder: What Each One Changes Without Telling You
All three colour pages accept what you give them and quietly rewrite it. The converter's HEX box parses a number, so #FF0000ff becomes #0000FF; its HSL box rounds, so 89.4% of colours do not survive a HEX→HSL→HEX round trip. The extractor analyses a 4000×3000 photo through five of its 4,000 columns, pins its first cluster centre to the top-left pixel, and reports a 1% accent as 100% because the white it sits on was filtered out. The gradient builder refuses a fifth stop. Every figure below was read out of the pages' own scripts or measured by driving them.

Advertisement