Color Match
Give any image someone else's color grade
- image
- reference_image
- IMAGE
You have an image whose colors are wrong and a reference whose colors are right, and you want the first to take on the second. That's this node. It's one of those quiet post-processing tools people forget exists until they need it three times in one afternoon: matching an outpainted region to the rest of the frame, making a composited subject sit in a new background's light, or forcing an upscaled tile to blend with its neighbors. The color-match doc in the knowledge base puts it bluntly - reach for the deterministic primitive before you re-roll a generation because "the colors are off." This is that primitive.
What it actually does
Color Match runs per-channel histogram matching. For each of the R, G, B channels it computes the histogram (the empirical cumulative distribution) of your image and of the reference, then remaps every pixel value so your image's distribution lines up with the reference's. The math is straight from the classic hist_match recipe - interpolate your quantiles onto the reference's quantiles.
That mechanism is worth knowing, because it's different from the other color-match node people usually cite (spacepxl's Color Match Image, which does a mean/std statistics transfer). Histogram matching is the aggressive one: it doesn't just shift the overall cast, it tries to reproduce the reference's shape of tones per channel. Feed it a moody, low-contrast reference and your image will pick up that exact tonal shape. Feed it a reference with a very different brightness range and it will stretch your image to match - which can look great or look like a grade you never wanted. If the result feels overdone, that's what blend_factor is for.
The inputs that matter
Three required inputs, that's the whole node:
image- what gets recolored.reference_image- the color source. One reference can be cloned across a whole batch, or you can pass one per image.blend_factor- 0 to 2, default 1. 1.0 is the full histogram match. 0.5 gives you a half-strength version of the original, and values above 1.0 exaggerate the match past the reference. A blend_factor around 0.3–0.6 is where most people actually land for a "nudge the palette" look.
Output is a single IMAGE, same resolution as your input. Nothing surprising there.
Install
Part of the Quasimondo pack - Mario Klingemann's grab-bag of "I wrote it myself because it was faster than finding the right one" nodes. Easiest path: ComfyUI Manager → Install Custom Nodes → search ComfyUI-QuasimondoNodes, install, restart.
By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Quasimondo/ComfyUI-QuasimondoNodes
cd ComfyUI-QuasimondoNodes
pip install -r requirements.txt
Then restart ComfyUI. No model downloads - everything in this pack is procedural. The requirements are moderngl and opencv-contrib-python; Color Match itself only leans on numpy, so if those installs give you trouble this node isn't the one demanding them.
Where people get burned
The classic failure: matching a bright reference onto a dark image. Histogram matching remaps quantiles, so dark source pixels get pushed to wherever the reference's dark quantiles are - if the reference has almost no dark tones, you get a washed-out, low-contrast mess and it looks like a mistake. Fix it by matching a same-ish-exposure reference, or pull blend_factor down.
Second, batch size. Pass a batch of 8 images and a reference batch that's neither size 1 nor 8 and the node throws a ValueError rather than guessing. Third, flat regions: per-channel histogram matching can introduce a faint color cast in large uniform areas because each channel gets nudged independently. Mild, but you'll see it in skies.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| reference_image | IMAGE | — | |
| blend_factor | FLOAT | 1.0000–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |