Overview
Introduction
This tool isolates a single color from a multi-color icon, entirely in your browser, so you can inspect or export just one element of a layered graphic.
It's the same color-isolation operation used by the site's general PNG color separator, applied here to icon-sized assets.
What Is Icon Colors Separator?
A client-side color isolator that reads an uploaded icon's pixel data, compares every pixel's color to a target hex value, and clears any pixel that falls outside the chosen tolerance to full transparency.
It's the mirror image of removing a color: instead of deleting matches, it keeps only the matches and deletes everything else.
How Icon Colors Separator Works
For each pixel, the tool computes the squared Euclidean distance between its RGB value and the target color's RGB value, then compares that against the squared tolerance.
Pixels within tolerance keep their original color and alpha; pixels outside it are set to alpha 0, leaving a clean single-color layer.
When To Use Icon Colors Separator
Use it when you need to export just one color from a multi-color icon, such as pulling the accent color out of a logo mark for reuse elsewhere.
It's also useful for debugging a color palette by visualizing exactly which pixels in an icon use a particular shade.
Often used alongside Icon Color Picker and Icon Outline Adder.
Features
Advantages
- Runs entirely client-side; the uploaded icon is never sent to a server.
- Adjustable tolerance handles anti-aliased and near-matching colors gracefully.
- Produces a transparent-background layer ready to composite elsewhere.
Limitations
- A single run isolates only one target color; multi-color extraction requires running the tool once per color.
- Very low tolerance values can miss anti-aliased edge pixels that blend slightly toward a neighboring color.
Examples
Best Practices & Notes
Best Practices
- Sample the exact hex code with the Icon Color Picker first for a precise target.
- Start with a small tolerance and increase it gradually if edge pixels are missing.
Developer Notes
The pure separation math lives in a lib function that thinly re-exports the shared color-isolation function (also used by the general-purpose PNG colors separator) under this icon-specific name, since an icon is just a PNG once uploaded and the underlying pixel comparison is identical.
Icon Colors Separator Use Cases
- Pulling a single brand color layer out of a multi-color logo icon
- Auditing which pixels in an icon use a specific shade
- Preparing a single-color stencil layer from a colorful icon
Common Mistakes
- Setting tolerance too high, which can accidentally include unrelated colors that happen to be numerically close in RGB space.
- Forgetting that RGB distance doesn't perfectly match human color perception, so visually similar colors can sometimes fall outside a low tolerance.
Tips
- Use the Icon Color Picker to grab an exact hex value before separating.
- If the result looks too sparse, nudge the tolerance up in small increments rather than jumping to a high value.