OpenCV colorChange_1
ColorChange_1 — the twin recolor node with the same three multipliers
- src
- mask
- dst
- nparray
colorChange_1 is a duplicate of colorChange_0 - same src, mask, and multiplier inputs, same single image output. The opencv-comfyui pack auto-generates a node per type-definition overload, so the MatLike/UMat variants come out as identical _0/_1 twins. There's no extra feature hiding in the _1. If you've read the _0 page, you're done here; this is the recap for anyone who landed on this one first.
What it does: OpenCV's colorChange is a recolor effect from the Photo module's non-photorealistic rendering family. Give it an image and a mask, and it shifts the color of the masked region while preserving its texture and shading - the difference between "recolor this object" and "paint over it." That makes it a nice deterministic post-processing move for color-swapping a shirt, a car, or a background element in a generated image without destroying the detail.
Inputs and output. src (NPARRAY, the base image) and mask (NPARRAY, same size, white = the region to change), then three FLOAT multipliers - red_mul, green_mul, blue_mul - that scale how much of the original per-channel color survives (lower = flatter, more uniform recolor; higher = closer to the source). The optional dst is an exposed out-parameter; leave it. Output is one nparray, the recolored image.
The context that matters. This pack lives on the OpenCV side: BGR 0..255 uint8 nparrays, batch_size == 1 only, bridged from ComfyUI's RGB IMAGE tensors with Image2Nparray / Nparrays2Image. Your mask must be an OpenCV-side nparray too. And don't expect surgical precision - it's a stylization filter, so audition the multipliers before you commit. If a value produces nothing useful, remember the README's 'NoneType' object has no attribute 'shape' warning: not every nparray output is a viewable image.
Install is the pack-wide story - ComfyUI Manager, search "OpenCV", or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-python-contrib
Restart after; no model files. And the author's standing advice applies here as everywhere: auto-generated, ugly, "expect dragons." This particular dragon is a friendly one - a recolor filter that behaves exactly like its twin.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| mask | NPARRAY | — | |
| red_mul | FLOAT | — | |
| green_mul | FLOAT | — | |
| blue_mul | FLOAT | — | |
| dstopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |