Color Clip (advanced)
Color Clip, but you pick the replacement colors too
- image
- color
- color_a
- color_b
- IMAGE
The basic Color Clip can only repaint pixels black, white, or leave them alone. That covers masks and silhouettes, but sometimes you don't want a mask - you want an actual recolor. That's the one job Color Clip (advanced) exists for: same clip logic, but you can swap the target color and the complement to any two colors you provide.
Think of it as a two-color repaint with hard edges. If you have a flat-color render and want to change the character's shirt from red to blue, target the red, set it TO_A, set color_a to your blue - and every red pixel becomes blue while everything else stays put. Or flip the complement to a different color and watch the background change while the target stays untouched.
How it differs
The mechanics are identical to Color Clip - exact per-pixel match on color, then per-pixel ops - but the operation enums are richer:
- NOTHING - leave as-is
- TO_A - repaint to
color_a - TO_B - repaint to
color_b
You set target and complement independently, and the two optional inputs are color_a and color_b, both COLOR type. Note the defaults: target is NOTHING and complement is TO_A, which is a slightly unusual starting point - if you connect it up and nothing seems to happen, check that you actually set target, because defaulting to NOTHING means no pixels get repainted.
Inputs, then: image, target, complement, color (the color being matched), plus optional color_a and color_b. One IMAGE output. Feed colors from the pack's Color (RGB) node or any COLOR source; if you leave color_a/color_b unconnected while using TO_A/TO_B, the node warns you in yellow and substitutes whatever select_color falls back to, so wire them up.
Where you'd use it
- Recoloring flat UI or logo renders without touching a paint tool.
- Producing a colored matte (e.g. target to black, complement to a tint) for nodes that read brightness from color.
- Collage prep, where you want a silhouette in a specific fill color, not just white on black.
Same hard constraint as the basic node: exact match, so feed it flat synthetic colors, not photographs.
Install
Same pack, same story:
cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_bmad_nodes
cd comfyui_bmad_nodes
pip install -r requirements.txt
or install "comfyui_bmad_nodes" through ComfyUI Manager and restart. No extra models, no API keys - it's pure pixel math via the pack's OpenCV/scikit-image stack. If the node is missing after install, the requirements didn't land; pip install -r requirements.txt fixes it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| target | COMBO | NOTHING | 3 options: NOTHING, TO_A, TO_B |
| complement | COMBO | TO_A | 3 options: NOTHING, TO_A, TO_B |
| color | COLOR | — | |
| color_aopt | COLOR | — | |
| color_bopt | COLOR | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |