Calculator
What the Color Palette Extractor does
Color Palette Extractor: samples the image at low resolution, buckets pixels into 4-bit colour bins, merges near-identical bins and returns the most common colours with their share of the image, as swatches, a hex list and ready-made CSS custom properties. Everything runs in your browser and the file is never uploaded.
The Color Palette Extractor works on a file you choose, without sending it anywhere. The work happens inside your browser tab, so there is no upload to wait for and no queue.
A smaller file that still looks right is usually only a few settings away. That is usually what brings people preparing images for the web here.
There is no back end here. The calculation runs where you are sitting, not on a server somewhere.
If you want to check the arithmetic, the field table, the method and a worked example are further down.
What do the Color Palette Extractor fields mean?
The Color Palette Extractor uses 2 inputs. A complete set of starting values is loaded for you, so nothing is required before the first result appears.
| Field | What to enter | Default |
|---|---|---|
| Image file | stays on your device | none |
| Colours to extract | accepts 2 to 12 | 6 |
How does the Color Palette Extractor work?
Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same result.
Range checks come first, so the formula only ever sees values it can handle.
What a typical run looks like
You provide: Image file and Colours to extract
What happens: the file is read into memory by your browser, processed locally, and offered back as a download. It is never uploaded.
You get back: a download link for the new file and a short note on what changed.
Timing comes down to your own hardware, and the practical size limit is how much memory the browser will hand the tab.
How to use it
- Choose your file under Image file, or drag it onto the drop area.
- Type Colours to extract (2 to 12).
- Press Extract Palette.
- The panel reports Status, Dominant colour, Hex values and CSS variables.
- Share the link rather than a screenshot. It carries the values with it.
What this tool does not do
- EXIF metadata may be dropped during processing, which is usually desirable but is worth knowing.
- Re-encoding a lossy format such as JPEG always loses some detail, even at maximum quality.
- It cannot detect a typo that happens to fall inside the valid range.
- The tool cannot tell whether a number was entered in the unit you intended, so double-check the labels.
- Large files are limited by your available memory, not by an upload quota.
Frequently asked questions
The form asks for Image file and Colours to extract. Each field is pre-filled with a sensible default, letting you treat it as a what-if tool rather than a data-entry form.
Colours to extract accepts 2 to 12. If a value falls outside, the tool says which field is at fault instead of guessing.
It is not uploaded. Everything happens on your device, so no copy of your file exists on any server.
It is free to use, with no premium tier holding back the useful parts.
Full double precision is used throughout; only the displayed figure is shortened.