Color Region Cutout & Mask
Select a matching color region and export a transparent cutout and feathered mask.
Try an example: Keep the red image region · Erase the matching region
How it works
Click by percentage coordinates to select similar colors. Choose contiguous four-connected pixels or every matching pixel, tune tolerance, invert the selection and feather its boundary. Download a PNG cutout or erased region plus a grayscale mask. This file tool uploads to the server; Lumina Selection Lab performs the same selection locally.
- Auto-orient and convert the first frame to 8-bit sRGB. Reject inputs over 16 MP and reduce the longest side to at most 1024 pixels without enlargement. Output dimensions are this working size; metadata is stripped.
- A pixel matches when the largest absolute difference of premultiplied encoded-sRGB R, G, B or alpha from the seed is at most tolerance. Every candidate is compared with the original seed, never a running neighbor color. Hidden RGB at zero alpha does not affect matching.
- Contiguous mode uses four-connected flood fill. Global mode tests every pixel. Inversion happens before feathering; counts and bounds describe the hard binary selection. Coordinates of 100% address the final pixel.
- Feather is one separable box blur with edge-normalized support. It extends inward and outward. The resulting coverage multiplies original alpha for cutout, or its complement for erase. The grayscale PNG mask stores coverage as opaque gray. This is color matching, not subject recognition.
Sources
Related tools
- Image Shape Mask & Feather – Clip a photo into a soft rectangle or ellipse with PNG transparency.
- Raster Artwork to SVG – Trace logos and flat artwork into real SVG paths with a limited color palette.
How to use the Color Region Cutout & Mask
Select a color region from a seed point, keep or erase it, and download a transparent PNG plus a grayscale selection mask.
What it is for
A logo on a plain white background, a product shot against a colored backdrop, a scanned signature: when the part you want to remove is one even color, a magic-wand selection is often all you need. This tool does that for one uploaded image. You point at a color with percentage coordinates, choose how similar other colors must be, and get back a transparent PNG and a grayscale mask you can reuse in another editor.
The image is uploaded to the server. PNG, JPEG, WebP and the first frame of a GIF are accepted, up to 8 MB and 16 megapixels, and the working copy is reduced to at most 1024 pixels on its longest side. The tool matches colors only; it does not recognize people or objects. Lumina's Selection Lab runs the same selection engine locally and adds rectangles, ellipses and combined selections.
Worked example
We uploaded a 1600 × 600 PNG with the black word "Hamburg" on a white background and used Seed X 2 %, Seed Y 2 % (a white pixel near the top-left corner), tolerance 10, contiguous pixels only on, feather 2 and the result Keep selected area.
The tool reported 360075 pixels selected (91.57 %) on the 1024 × 384 working image, with bounds covering the whole image. The selection is the connected white background. Everything else, about 33 000 pixels, is the black lettering, its anti-aliased edges and the white counters inside letters such as "a", "b" and "g", which the background does not touch.
With Keep selected area, the PNG keeps the white background and the letters become transparent. Choose Erase selected area instead and the background disappears while the lettering stays; the selection and its counts are identical either way.
How to read the result
- Selected pixels and selected area count the hard selection before feathering.
- Bounds give the smallest rectangle around the selection in working-image pixels.
- Download color region PNG is the edited image with transparency.
- Download grayscale selection mask is opaque: white is selected, black is not, and gray marks feathered coverage.
- Both files use the working size, so a large photo comes back smaller than the original.
Tips and common mistakes
- Pick a seed inside a large flat area, not on an anti-aliased edge; the tolerance is measured from the seed color, not from each neighbor.
- Start with a low tolerance (10–30) and raise it if parts of the area stay unselected. Too high and the selection leaks into similar colors.
- Turn contiguous pixels only off to catch enclosed areas, such as the inside of an "o", or every matching color in the image.
- Invert selection turns "select the background" into "select the subject" without moving the seed.
- Feather softens both sides of the edge. Values of 1–3 hide jagged edges; large values create a glow.
- JPEG noise makes flat colors uneven. Use a PNG source when you can, or raise the tolerance slightly.
FAQ
Can it remove the background behind a person?
Only if that background is one fairly even color. It matches colors and does not detect subjects.
Why is my output smaller than the uploaded image?
The tool works on a copy that is at most 1024 pixels on its longest side and returns that size. Selection Lab uses the same limit but keeps the image on your device.
What does 100 % for Seed X mean?
It addresses the last column of pixels. 0 % is the first column; the same applies to Seed Y and rows.
Does the mask include the feathering?
Yes. The grayscale mask stores the feathered coverage, while the reported pixel counts describe the hard selection.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://luminacolorregion.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://luminacolorregion.usefulweb.app/mcp· tool namelumina_color_region
Example request
curl -s -X POST https://luminacolorregion.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"image":{"filename":"red.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEX/////AADrWueTAAAAEklEQVQI12NgIBb8/09dgjgAAPcnH+GApkH4AAAAAElFTkSuQmCC"},"x":50,"y":50,"tolerance":0,"feather":0}'