Nodes/ComfyUI Essentials/πŸ”§ Image Color Match
ComfyUI Node Runs on cloud

πŸ”§ Image Color Match

Image Color Match (ComfyUI Essentials)

By cubiqΒ·Created 3 years agoΒ·Updated about a year agoΒ· 1,155
πŸ”§ Image Color Match
  • image
  • reference
  • reference_mask
  • IMAGE
β—„color_spaceβ–Ύβ–Ί
β—„factor1.00β–Ί
β—„deviceβ–Ύβ–Ί
β—„batch_size0β–Ί

When two images that are supposed to belong together have mismatched color - a composited subject that's too warm for its new background, an upscaled patch that drifted cooler than the original, a batch where every frame graded slightly differently - Image Color Match fixes it. It pushes the colors of one image toward a reference so they read as one shot. It's a quiet workhorse in compositing and batch workflows.

Why you'd reach for it

Color consistency is where a lot of composites fall apart. You cut out a product, drop it on a generated scene, and the lighting temperature is off; or you inpaint a region and it comes back a different hue than its surroundings. This node transfers the color statistics of a reference onto your image so the two match, which is a standard step in the product-photography pipeline (extract subject β†’ place on scene β†’ match color β†’ relight β†’ composite). It also earns its keep across a batch of frames that need a consistent grade. Think of it as automatic color-matching instead of hand-tuning curves.

How it works

It matches the color distribution of your image to that of a reference image. color_space picks the space the matching happens in - LAB is usually the best perceptual choice, but YCbCr, RGB, LUV, YUV, and XYZ are offered because different material responds better in different spaces. factor is the strength: 1.0 fully matches to the reference, lower values blend partway so you keep some of the original's character. There's an optional reference_mask so the node samples color only from a chosen region of the reference - useful when you want to match, say, the skin tones of the reference rather than its whole frame. It leans on a color-matching library under the hood, which is why it has its own dependency (see install).

Inputs and outputs

Required: image (what gets recolored) and reference (the target look). The dials that matter: color_space (start with LAB), factor (pull it below 1.0 if the full match is too aggressive), and optionally reference_mask to restrict the sampled region. device (auto/cpu/gpu) and batch_size control execution. Output is IMAGE - the recolored result.

Installing it

Part of ComfyUI Essentials by cubiq (Matteo Spinelli, the IPAdapter node author). ComfyUI Manager: search ComfyUI Essentials, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_essentials

then restart. It's πŸ”§ Image Color Match under essentials/image processing, class ImageColorMatch+. The pack is maintenance-only as of April 2025. Note this node relies on the color-matcher Python library; the pack's requirements normally pull it in, but if the node fails to load, a missing dependency is the first thing to check.

Common issues

The classic trap is factor at 1.0 being too strong - a full match can wash your image toward the reference's mood and lose detail or contrast that you wanted. Ease it down until it just closes the gap. If the match looks wrong, try a different color_space; LAB is the safe default but some grades sit better in YCbCr. And if the node won't import at all, it's almost always the color-matcher dependency not installing cleanly - reinstall the pack's requirements or check your console log, since custom-node dependency conflicts are the single most common ComfyUI failure mode.

Categoryessentials/image processing

Inputs (7)

NameTypeDefaultDescription
imageIMAGEβ€”
referenceIMAGEβ€”
color_spaceCOMBO6 options: LAB, YCbCr, RGB, LUV, YUV, XYZ
factorFLOAT1.000–1β€”
deviceCOMBO3 options: auto, cpu, gpu
batch_sizeINT00–1024β€”
reference_maskoptMASKβ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”