Skip to content
Toolars
Explore

Image Color Extractor

Extract a ranked palette from quantized Canvas pixels without uploading the image. HEX / RGB / HSL / %; JSON.

Local processing

Processing details

Tool inputs are processed on your device.

Resources may be downloaded to run this tool. Account services are separate.

Privacy information
Report bug

Task path / input to outcome

How to extract a color palette from an image

  1. 01

    Choose the image

    Select Choose file — or drop the image onto the zone — and open a PNG, JPEG, or WebP up to 12 MiB, at most 8,192 pixels per side and 24,000,000 pixels in total. The pixels are decoded locally; nothing is uploaded.

  2. 02

    Set the palette size

    Choose between 1 and 12 colors with the Palette colors slider. Fewer colors give a broader summary — three to five is a good starting point for a page palette — while more colors surface accent shades that a small palette would absorb into their neighbors. 1–12. HEX / RGB / HSL / %.

  3. 03

    Extract the palette

    Press Extract palette. The tool groups decoded RGB values into fixed 16-level channel buckets, ignores fully transparent pixels, and weights each remaining pixel by alpha. It ranks those buckets by weighted share of the visible analyzed sample. Images above 4,000,000 pixels use a downscaled copy, so the palette is an estimate rather than an exact census of the original file.

  4. 04

    Copy or download the colors

    Each swatch shows HEX and an approximate share of the visible analyzed sample. Click a swatch to copy its HEX code, or Download JSON with hex, rgb, alpha, and share fields. The top 1–12 buckets are returned; their shares need not add up to 100%.

Tool facts

Processing
In your browser
Input leaves this device
Never
Retention
Nothing is stored
Price
Free

Your input stays in the browser.

Image Color Extractor uses its verified local execution path and does not create a hidden input or output history.

Local execution

Runs inside the current browser tab.

No hidden processing

Active tool data never becomes a Toolars document record.

No account required

Use the core workflow without creating a profile. Favorites sync to your account after you sign in.

Immediate reset

Clear the tab and the active working data is gone.

What Image Color Extractor actually does

HEX / RGB / HSL / %; JSON. Inputs and results stay in memory in this browser tab.

Common questions

How are the colors chosen and ordered?
Pixels are assigned to fixed RGB buckets using the upper four bits of each channel. Adjacent-looking shades can land in different buckets, while shades inside one bucket are averaged. Fully transparent pixels are ignored and partial alpha sets the weight. The result contains up to the requested number of highest-weight buckets, not a guarantee of distinct design colors.
How many colors should I choose?
Start small: one to three colors summarizes the image's mood, while five to seven usually separates background, subject, and accent cleanly on photos. Push toward 12 only for artwork with many distinct flat colors, where the extra swatches stay meaningful instead of splitting one gradient into near-duplicates.
How does the extractor treat transparency?
Fully transparent pixels are excluded from the measurement entirely, and semi-transparent pixels count in proportion to their opacity, so a soft-edged cutout does not drag the palette toward an invisible background. The alpha field in the JSON download reports each color's average opacity.
What do the fields in the JSON download mean?
hex and rgb describe a bucket’s rounded average RGB, alpha is its average opacity, and share is its alpha-weighted fraction of all visible pixels in the analyzed Canvas sample. It is not an exact area fraction of the source image. Only the leading buckets are exported, so their shares may total less than 100%.
Why does the palette look approximate?
The fixed RGB buckets simplify the image into a small palette, but they do not merge every pair of visually similar colors: a bucket boundary can split close shades. Images above 4,000,000 pixels are resampled before analysis, which can change fine details and the ranking. Check the swatches against the source before adopting them.
Is the image uploaded anywhere?
No. Decoding and quantization run fully inside the current browser tab, no account is required, and resetting the workspace discards the image and the extracted palette.

Related tasks, not a dead end.

Move into another focused workspace without returning to the full index.

Image Cropper

Drag to crop, choose a ratio, and download your image. Rotation: 90° / 180° / 270°.

Edit

Image Filters

Render 33 adjustable operations, including hue rotation, both flips and ordered dithering.

Edit

Image Compressor

Choose a target size or encoding quality for JPEG/WebP. Process locally, keep dimensions, check bytes, and download. A smaller file is not guaranteed.

Convert

Image Resizer

Resize local PNG, JPEG, WebP, SVG or GIF images to an exact size with an optional aspect-ratio lock. PNG / JPEG / WebP / SVG / GIF. GIF input exports the first frame only; animation is not retained.

Edit