ComfyUI Node
Color Match π
Transfers the reference image's color statistics onto the input β fixes the color shift on inpainted or stitched regions. Four methods: lab and rgb move per-channel mean/std, mkl maps the full color covariance, histogram matches each channel's distribution exactly. An optional mask restricts both the measurement and the correction to its white area (invert_mask flips that), which is why the node takes a mask but outputs none: the mask only scopes the fix, and passes through your graph unchanged. Strength blends between the original and the fully matched result. For video, reference_mode: first_frame locks every frame to the batch's own first frame β the one-node flicker fix, no reference needed.
Color Match π
- image
- reference
- mask
- image
βstrength1.00βΊ
βmethodlabβΊ
βinvert_maskfalseβΊ
βreference_modereferenceβΊ
Categoryπ AusBoss/Image
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | BHWC image whose colors get corrected. | |
| strength | FLOAT | 1.000β1 | Blend between the original (0) and the fully matched image (1). |
| referenceopt | IMAGE | The image whose color statistics to copy β for an inpainted crop, feed the original image here. A single reference broadcasts across a batch. Required unless reference_mode is first_frame. | |
| methodopt | COMBO | lab | How the colors move. lab: perceptual mean/std shift, the safe default. rgb: the same in raw channels. mkl: full covariance mapping, best when hues are rotated, not just shifted. histogram: exact per-channel distribution match, the strongest and least subtle. |
| maskopt | MASK | Restricts the correction to the white area β both the statistics measured on the image and where the fix is applied; typical for recoloring just an inpainted region. Black pixels pass through bit-identical, so the mask itself never changes β wire your original mask onward. Without a mask the whole image is matched. | |
| invert_maskopt | BOOLEAN | false | Treat the mask's black area as the region to correct instead of the white area. |
| reference_modeopt | COMBO | reference | Where the target statistics come from. reference uses the connected reference image. first_frame uses the batch's own first frame as the target for every frame β locks a video's color in place to kill flicker; the reference input is ignored. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The color-matched image; pixels outside the mask are untouched. |