Unique Color Mask Creator

Uploads a PNG, tallies the exact RGBA color of every pixel, and keeps only pixels whose color occurs exactly once in the whole image, making every repeated color fully transparent. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool finds and isolates every pixel in a PNG whose exact color is one-of-a-kind, making the rest of the image transparent.

It's a niche but genuinely useful way to spot anomalous or accidental pixels in an otherwise flat-colored image.

What Is Unique Color Mask Creator?

A frequency-based color mask: it tallies every pixel's exact RGBA color across the whole image, then keeps only the pixels whose color occurs exactly once.

Everything with a repeated color, however common or rare, is masked away.

How Unique Color Mask Creator Works

The tool makes two passes over the image. First it builds a frequency map keyed by each pixel's exact `r,g,b,a` string. Second, it walks the image again and keeps only pixels whose color count is exactly 1, setting every other pixel to fully transparent.

Because the comparison is exact, even a one-unit difference in any channel (from anti-aliasing or compression) counts as a different color.

When To Use Unique Color Mask Creator

Use it to spot stray artifact pixels — a single mis-colored pixel left over from a botched edit or a compression glitch.

It's also useful on pixel art or flat-design graphics to audit whether any pixel accidentally deviates from the intended palette.

Features

Advantages

  • Runs entirely client-side; nothing is uploaded to a server.
  • Requires no manual color picking — uniqueness is determined automatically from the image itself.
  • Exact RGBA comparison means it never accidentally merges visually distinct colors.

Limitations

  • On photographic images with smooth gradients and anti-aliasing, nearly every pixel can be technically 'unique', producing a mask that looks like the whole image survived.
  • It only detects exact color matches — near-duplicate colors one unit apart are still counted as different.

Examples

Spot a stray pixel

Input

A flat blue icon with one accidental off-color pixel

Output

Only that single off-color pixel survives, the rest is transparent

The stray pixel's color occurs once; the flat blue background repeats thousands of times and is masked away.

Fully repeated palette

Input

A 4-color pixel art image where every color repeats many times

Output

A fully transparent output

No pixel's exact color is unique, so nothing survives the mask.

Best Practices & Notes

Best Practices

  • Use this tool primarily on flat-color or pixel-art style images where 'unique' is a meaningful signal.
  • Expect near-total pixel survival on photographic images and interpret the result accordingly.

Developer Notes

The two-pass frequency count runs as a pure function over a plain Uint8ClampedArray PixelBuffer using a Map keyed by a template-string RGBA key, with no DOM/canvas dependency, so both passes are fully unit-testable in Node.

Unique Color Mask Creator Use Cases

  • Finding a single mis-colored pixel introduced by a bad export or filter
  • Auditing pixel art for accidental off-palette pixels
  • Spotting compression artifacts in a supposedly flat-color region

Common Mistakes

  • Running this on a photo and expecting a sparse result — photographic gradients make almost every pixel technically unique.
  • Forgetting alpha is part of the comparison, so a fully-opaque and a semi-transparent pixel of the same RGB are treated as different colors.

Tips

  • Flatten or posterize an image first if you want 'unique' to mean something closer to 'visually distinct' rather than 'byte-for-byte distinct'.
  • Combine with the popular color mask tool to see both extremes: the most common color and the rarest pixels.

References

Frequently Asked Questions