Image Color Palette
Image Color Palette
Cancel

Upload an image to automatically analyze all pixels and extract dominant colors. Three classic color quantization algorithms are available, with adjustable color count and sampling precision. Results are sorted by proportion and shown as HEX + RGB values, with code snippets generated for Swift / Objective-C / Kotlin / Java / ArkTS / Flutter. Everything runs locally in your browser — your image is never uploaded to any server.

Notes:

  • Upload: select or drag an image (PNG / JPEG / WebP / GIF / BMP, etc.), rendered on a local Canvas, auto-scaled to max 1200px for large images
  • Extraction algorithms:
    • K-Means clustering (k-means++ init) — classic clustering, even color distribution
    • Median Cut (Heckbert 1982) — same family as Color Thief, fast
    • Histogram — 3D color histogram quantization + similar-color merging, great for discrete dominant colors
  • Color count: 3 / 5 / 7 / 10 colors
  • Sampling precision: controls pixel sampling step; larger steps are faster but slightly less precise
  • Output: each color shows HEX string, RGB value, and percentage, all one-click copyable
  • Code snippets: auto-generated Swift / Objective-C / Kotlin / Java / ArkTS / Flutter code, with switchable language tabs
  • Algorithm source: complete implementations of all three algorithms in Swift / Objective-C / JavaScript, for learning and porting to your own projects
Upload an image, choose an algorithm, extract dominant colors with multi-language code snippets — 100% local, nothing uploaded
or drag an image here

Algorithm Source

Complete implementations of all three color quantization algorithms in Swift / Objective-C / JavaScript, for learning and porting to your own projects.