Generator node

Color Mask

One colour group's region from a connected Color Analysis, as a real mask image: white where the picked Index's colour rules, with a perceptual soft edge (Softness) that follows the actual colour boundary. The group's base colour rides along on the Color output. Use it anywhere a mask goes -- Canvas, particle fields, Flow Map, colliders.

Inputs

PortTypeDefault
ImageCable the Image output of a Color Analysis node here — that connection carries both the palette and the original picture the mask is sampled from.image—
EnableOff clears the mask to fully transparent.booltrue
IndexWhich colour group becomes the white area, counting from 0. Values past the last group pick the last one.int0
SoftnessHow gradual the mask edge is, following the actual colour boundary rather than a screen blur. Clamped to 0…1; 0 is a hard cut.float0.1
InvertSwaps the mask, so everything except that colour becomes white.boolfalse

Outputs

PortType
ImageCable the Image output of a Color Analysis node here — that connection carries both the palette and the original picture the mask is sampled from.image
Colorcolor
Widthfloat
Heightfloat

How It Works

Color Mask takes one colour group from a connected Color Analysis and returns its region as a real full-resolution mask image: white where the picked Index's colour rules, black elsewhere. The edge is PERCEPTUAL — the softness comes from the margin between this colour and the nearest other colour in Oklab, so the transition hugs the real boundary instead of a blurred silhouette.

The node also outputs that group's Color, so a downstream effect can be tinted with the colour it is masking.

Use Cases

  • Mask anything — Canvas masks, particle field masks, collider silhouettes, Flow Map fields, Liquid Simulation emitters.
  • Isolate by colour — pull the red jacket out of a live camera without a green screen.
  • Per-colour effects — one Color Mask per index, each driving its own effect chain.

Tips

  • Indices are stable across frames thanks to Color Analysis' warm start, so a mask keeps following the same colour.
  • Use the Color output to tint whatever the mask drives — the result stays consistent when the scene's palette shifts.
  • For a finished cutout rather than a mask, use Color Blob.

Open Color Mask in the interactive catalog →

Color Mask is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Generator nodes