Create Unique Color Mask
Identify every unique color in your image and visualize them with a randomized color mask. See the total color count.
Increase tolerance to group similar colors together. 0 = exact pixel colors.
Drop in any image and every distinct pixel color gets swapped for a random bright shade, turning the photo into a vivid segmentation map with an exact count of how many unique colors it really contains. The tolerance slider groups near-identical pixels so you can cut through photographic noise and see meaningful regions instead of a million look-alike blues. And everything runs in your browser. Nothing gets uploaded.
How to Use
Upload an image by dragging it onto the drop zone or clicking to browse your files.
View the color mask -- every unique color in your image is automatically replaced with a random highlight color, creating a vivid segmentation mask.
Adjust tolerance using the slider to group similar colors together, reducing the total count for cleaner results.
Download the color mask as a PNG file.
Frequently Asked Questions
What is a unique color mask?
A unique color mask replaces every distinct color in your image with a randomly generated bright color. This creates a visual map that shows exactly how many different colors exist in the image and where they appear. It is useful for image analysis, segmentation visualization, and understanding color distribution.
What does the tolerance slider do?
The tolerance slider groups similar colors together. At 0, every exact pixel color is treated as unique. As you increase tolerance, colors within that distance (in RGB space) are merged into groups, resulting in fewer unique colors and a cleaner mask. This is helpful for photos that have many near-identical colors.
Why might the color count be very high?
Photographs typically contain thousands or even millions of unique pixel colors due to subtle gradients, noise, and anti-aliasing. Use the tolerance slider to group similar colors and get a more meaningful count. Simple graphics like logos or pixel art will have far fewer unique colors.
Does this tool upload my image to a server?
No. All processing happens entirely in your browser using the Canvas API. Your image never leaves your device and nothing is sent to any server.