Create Unique Color Mask

Keep the rare colors of a PNG that stand out from its common colors.

Drop an image here

PNG, JPG, WebP, GIF or BMP. You can also paste an image.

No result yet

Options

How to use

  1. 1

    Upload a PNG.

  2. 2

    Raise Min distance to keep only the colors that stand out, or lower it to keep every rare color.

  3. 3

    Click Download to save the mask.

Example

Before640 × 427

The example input

After640 × 427

The example result
Create Unique Color Mask on a sample photo, with the default settings.

Frequently asked questions

What is a unique color?

A color that covers 0.1% of the visible pixels or less and is at least Min distance away from every common color. Colors are compared in RGB, where black to white is 100%.

Why did a rare color disappear?

It is close to a common color, such as a slightly lighter shade of the background. Lower Min distance to keep it.

About this tool

Create Unique Color Mask keeps the pixels whose color is both rare in the image and far from every common color, and makes the rest transparent. Accent marks, stray pixels and small highlights stay; the background and the main subject go. A color is rare when it covers 0.1% of the visible pixels or less. Min distance sets how different a rare color must be from every common color to count as unique: at 1% almost every rare color stays, and higher values keep only colors that stand out. All processing runs locally in your browser. Your image is never uploaded to a server.