Regional Mask Prompt Palette
The color cheat sheet that stops your region masks from silently failing
- palette_info
This node is the reference card for the pack. You tell it how many regions you're painting, and it prints the exact RGB and hex colors each region expects. One input, one output, that's the entire job - and it's worth having because the sibling RegionalMaskPromptEncode node doesn't match arbitrary colors. It looks for a fixed, deterministic palette, and if you paint with a color that isn't on the list, the mask quietly comes out wrong.
How it works
Under the hood, RegionalMaskPromptPalette calls the exact same palette function that RegionalMaskPromptEncode uses internally. It's the deterministic HSV walk borrowed from Regional Prompter's mask mode - saturation and value pinned at 50%, hue stepping around the color wheel as the region count grows. Region 1 is #804040, region 2 is #408080, region 3 is #608040, region 4 is #604080, and so on up to eight. Because both nodes share one function, the cheat sheet physically cannot drift out of sync with what the matcher is looking for.
The one input and output
region_count(default 4, range 1–8) - how many regions you plan to paint.palette_info(STRING) - the text listing with each region's RGB and hex values.
Wire palette_info into any text display node (core ComfyUI has ShowText, or grab one from your favorite utility pack) so it stays visible in the graph, or just run it once and keep the hex codes next to your paint program.
Install
It ships in the same pack either way - ComfyUI Manager, searching for "ComfyUI-Regional-Mask-Prompt", or:
cd ComfyUI/custom_nodes
git clone https://github.com/dr1610/ComfyUI-Regional-Mask-Prompt.git
Restart ComfyUI. No dependencies, no model files, nothing heavy - this is a ~20-line utility node.
The gotcha it exists to prevent
The failure mode in this pack is silent. Paint your mask with a color that's close to but not equal to the palette color, keep mask_tolerance on its default 48, and the Encode node produces an empty or partial mask with no error message at all. Feather-touch a region with the wrong red and the fuzzy match bleeds into the neighboring region instead. Print this palette, paint with this palette, and your first generation won't be a debugging session.
Three extra notes. It's a documentation node, not a processing node - don't expect it to change any pixels. You don't have to paint all eight regions just because the palette lists them; Encode skips regions with no prompt. And if you leave this node in the workflow as a text note, the palette travels with the workflow file itself, so anyone who opens it later knows exactly which red means region 1.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| region_count | INT | 41–8 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| palette_info | STRING | — |