跳转到正文
🖼

Image Color Extractor

画像から主要色を抽出し、占有率(面積比)順にランキング表示。

Drop an image, or click to browse

PNG / JPG / WEBP · 10MB max

Upload an image to see the dominant colors ranked by area share — great for photos, logos, or screenshots where proportions matter.

Colors are chosen with median-cut quantization (a deterministic method that recursively splits color space), so the same image always yields the same result. The image is downsampled to about 150px before analysis for speed, so fine detail colors may be smoothed over. Everything runs locally in your browser — nothing is uploaded.

关于Image Color Extractor

Image color extraction analyzes the pixels in a photo, logo, or screenshot and pulls out the colors that best represent it as a palette — useful for identifying a logo's brand colors or picking a UI theme that matches a photo's mood. toco.tools's extractor runs entirely in the browser: pick how many colors you want, and it computes each color's HEX value and its share of the image. Under the hood it uses median-cut quantization, a deterministic algorithm. It starts with one box covering the full range of R, G, and B values in the image, then repeatedly finds the box whose widest color channel has the most spread and splits it in two at the midpoint of that range, continuing until the requested number of boxes exists. Each box's pixels are then averaged into a single representative color. Unlike k-means, which depends on random starting points, the same image and color count always produce the same result. The tool leads with area share rather than just a color list because proportions matter in practice: a color covering 40% of an image is likely the design's dominant background or brand color, while one covering only 2% is probably a decorative accent or noise. A practical workflow is to scan the bars from largest to smallest and treat the top entries as your brand color candidates. Note that JPEG compression artifacts or heavy gradients can sometimes split what should be one color into several close variants, so it's worth eyeballing the final palette before using it.

使用方法

  1. Drop or select an image
  2. Choose the color count (4/6/8/12)
  3. Copy the ranked palette or code output

常见问题

What is image color extraction?

A tool that analyzes an image's pixels and extracts representative colors as a palette, ranked by the area share each color covers.

What is median-cut quantization?

A deterministic algorithm that repeatedly splits a box covering the image's RGB range at the midpoint of its widest channel until reaching the target color count. No randomness is involved, so the same image and count always give the same result.

Why does the area-share percentage matter?

A color that covers a large share of the image is more likely to be the design's dominant or brand color, while low-share colors are often decorative accents or noise — the percentage helps you prioritize.

Can I change how many colors are extracted?

Yes, choose 4, 6, 8, or 12. If the image has fewer distinct colors than requested, the tool returns fewer entries rather than padding the result.

Is uploaded data sent externally?

No. All processing runs in your browser; nothing is sent to toco.tools servers.