API & MCP

Everything a person can do on Color Region Cutout & Mask, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Color Region Cutout & Mask

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.

Inputs of Color Region Cutout & Mask
FieldTypeDefaultDescription
image (required)file—Image (PNG, JPEG, WebP or GIF; up to 8 MB and 16 MP)
xnumber50Seed X (%)
ynumber50Seed Y (%)
toleranceinteger24Color tolerance (0–255)
connectedbooleantrueContiguous pixels only
invertbooleanfalseInvert selection
featherinteger0Feather radius (working pixels)
operationselect (cutout, erase)"cutout"Result

Example request

Keep the red image region

curl -X POST https://luminacolorregion.usefulweb.site/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}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "lumina-color-region": { "type": "http", "url": "https://luminacolorregion.usefulweb.site/mcp" }
  }
}