Outlier Color Mask Creator

Uploads a PNG, computes the per-channel mean and standard deviation of every pixel's RGB color, then masks the image down to only the pixels whose color sits more than a chosen number of standard deviations from that average, making rare or unusual colors easy to spot. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool finds the pixels in a PNG whose color is statistically unusual compared to the rest of the image, rather than relying on exact color matching.

It's a quick way to spot stray artifacts, compression noise, or a small distinctly-colored detail hidden in an otherwise consistent image.

What Is Outlier Color Mask Creator?

A client-side analyzer that computes the mean and standard deviation of the red, green, and blue channels across every pixel in an uploaded image, then measures each pixel's normalized distance from that average.

Any pixel whose distance exceeds a chosen threshold (in standard deviations) is treated as an outlier and kept visible in the output; everything else is made fully transparent.

How Outlier Color Mask Creator Works

The tool first computes the average red, green, and blue value across the whole image, then the standard deviation of each channel around that average.

For each pixel, it computes a normalized Euclidean distance — how many combined standard deviations away its color sits — and compares that to the threshold you set to decide whether the pixel counts as an outlier.

When To Use Outlier Color Mask Creator

Use it to spot a single stray colored pixel or small artifact hidden in a mostly uniform background, such as a sensor defect or compression glitch.

It's also useful for a quick visual sanity-check of how color-consistent an image is before further editing.

Features

Advantages

  • Finds unusual colors based on statistical distance, not just exact duplicate-vs-unique counting.
  • The threshold is adjustable, so you can tune between a loose or strict definition of 'unusual'.
  • Runs entirely client-side; no server ever sees the uploaded image.

Limitations

  • On images with naturally wide color variation (like a busy photo), 'statistical outlier' may not correspond to anything visually meaningful, since the standard deviation itself is already large.
  • Alpha is ignored in the distance calculation, so fully transparent and fully opaque pixels of the same RGB color are treated identically.

Examples

Find a stray red pixel in a gray background

Input

A mostly uniform gray image with one bright red pixel, threshold 1.5

Output

A mask showing only the red pixel, everything else transparent

The red pixel's color sits far more than 1.5 standard deviations from the gray background's average.

A perfectly uniform image

Input

A solid-color PNG, threshold 2

Output

A fully transparent mask (0 matched pixels)

With zero color variation, the standard deviation is 0, so nothing can qualify as an outlier.

Best Practices & Notes

Best Practices

  • Start with a threshold around 2 and adjust up or down depending on how strict you want the outlier definition to be.
  • Use this on images expected to be mostly uniform (icons, scans, solid backgrounds) for the most meaningful results.

Developer Notes

The mean/variance/distance computation is a pure function over the shared PixelBuffer type with two full passes over the pixel data (one to compute the mean, one for variance and the final mask), matching the two-pass statistical approach used elsewhere in the codebase's color-analysis tools.

Outlier Color Mask Creator Use Cases

  • Spotting a sensor artifact or compression glitch in an otherwise clean image
  • Highlighting a small distinctly-colored logo or watermark against a uniform background
  • Quickly checking how color-consistent a scanned or generated image is

Common Mistakes

  • Using a very low threshold on a naturally colorful photo, which can flag far more pixels than expected since 'outlier' is relative to that image's own variation.
  • Expecting alpha differences alone to trigger a match — only RGB color distance is measured.

Tips

  • If nothing is flagged, try lowering the threshold; if too much is flagged, raise it.
  • Combine with the Unique Color Mask for a second, exact-match perspective on the same image.

References

Frequently Asked Questions