Skip to main content

🔧 Mask From RGB/CMY/BW

essentials/mask
MaskFromRGBCMYBW+

Example

JSON Example
{
  "class_type": "MaskFromRGBCMYBW+",
  "inputs": {
    "image": [
      "node_id",
      0
    ],
    "threshold_r": 0.15,
    "threshold_g": 0.15,
    "threshold_b": 0.15
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
imageIMAGErequired--
threshold_rFLOATrequiredmin: 0, max: 1, step: 0.010.15
threshold_gFLOATrequiredmin: 0, max: 1, step: 0.010.15
threshold_bFLOATrequiredmin: 0, max: 1, step: 0.010.15

Outputs

IndexNameTypeIs ListConnection Reference
0redMASKNo["{node_id}", 0]
1greenMASKNo["{node_id}", 1]
2blueMASKNo["{node_id}", 2]
3cyanMASKNo["{node_id}", 3]
4magentaMASKNo["{node_id}", 4]
5yellowMASKNo["{node_id}", 5]
6blackMASKNo["{node_id}", 6]
7whiteMASKNo["{node_id}", 7]
How to connect to these outputs

To connect another node's input to an output from this node, use the connection reference format:

["node_id", output_index]

Where node_id is the ID of this MaskFromRGBCMYBW+ node in your workflow, and output_index is the index from the table above.

Example

If this node has ID "5" in your workflow:

  • red (MASK): ["5", 0]
  • green (MASK): ["5", 1]
  • blue (MASK): ["5", 2]
Was this page helpful?