swiftimg

Color palette extractor

Drop a JPEG, PNG, GIF, or WebP — swiftimg extracts the six most dominant colors and shows them as a hex-coded palette. Everything runs in your browser; the image never leaves your machine.

Drop an image here, or use the file picker:

How the quantizer works

The image is drawn into a 200-px-wide canvas, each pixel is binned into a 5-bit-per-channel grid (32 K buckets), and the six heaviest buckets are averaged back to RGB. Fast, deterministic, and close enough to a proper k-means for design moodboarding.

Need to host the image too?

Upload anonymously and share a permanent URL — or use the API to integrate this into your app.