Nodes/ComfyUI-AusBoss/Color Match πŸ†Ž
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.

By ausbossΒ·Created about a month agoΒ·Updated 7 days agoΒ· 2
Color Match πŸ†Ž
  • image
  • reference
  • mask
  • image
β—„strength1.00β–Ί
β—„methodlabβ–Ί
β—„invert_maskfalseβ–Ί
β—„reference_modereferenceβ–Ί
CategoryπŸ†Ž AusBoss/Image

Inputs (7)

NameTypeDefaultDescription
imageIMAGEBHWC image whose colors get corrected.
strengthFLOAT1.000–1Blend between the original (0) and the fully matched image (1).
referenceoptIMAGEThe 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.
methodoptCOMBOlabHow 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.
maskoptMASKRestricts 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_maskoptBOOLEANfalseTreat the mask's black area as the region to correct instead of the white area.
reference_modeoptCOMBOreferenceWhere 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)

NameTypeDescription
imageIMAGEThe color-matched image; pixels outside the mask are untouched.