🌅Apply Color Palette
Match any image's colors to a reference — ColorMatch2 is real color transfer, not a filter
- image_ref
- image_target
- image
The display name says "Apply Color Palette," but don't let that fool you - this is a genuine color-transfer node. You feed it two images and it shifts the colors of one to match the other. That's the whole trick, and it's surprisingly useful once you've ever stared at a render that looks almost right and wished you could just borrow the grade from a reference frame.
What it actually does
ColorMatch2 wraps hahnec/color-matcher, a research-grade Python library for color transfer between images. This isn't an LUT or a saturation slider; it computes a mapping between the color statistics of a reference image and a target image, then applies that mapping. The author's own description is honest about the pedigree: the methods come from Reinhard et al. (statistical transfer), Pitie et al.'s Monge-Kantorovich Linearization, an MVGD multi-variate Gaussian approach, and classical histogram matching - plus compound variants.
You pick the method from six options, defaulting to mkl:
reinhard- the classic statistical approach. Fast, works best when the two images are already similar.mkl- Monge-Kantorovich Linearization. The sensible default; handles more dramatic differences.mvgd- multi-variate Gaussian distribution transfer.hm- pure histogram matching.hm-mvgd-hm/hm-mkl-hm- histogram matching around the transfer, the quality picks. Slower, closer to "grade the target to look like the reference."
The inputs that matter
Only four, and you'll touch maybe three:
image_ref- the image whose look you want. The color source.image_target- the image being recolored.method- pick from the list above;mklis a fine starting point.strength- a FLOAT from 0 to 10, default 1. This is a blend: 0 leaves the target untouched, 1 is full transfer, and above 1 it exaggerates the shift. It's linear interpolation between the original and the transferred result, so think of it as a wet/dry knob.
Output is a single image, same size as the target, ready to feed into a Save Image, a compositor, or further post-processing.
Where people get burned
First: this is the one node in the pack that hard-fails without a dependency. If you haven't run pip install -r requirements.txt, executing it raises "Can't import color-matcher, did you install requirements.txt?" The pack's other nodes don't need color-matcher, so it's easy to have everything else working and get walloped here.
Second, the batch rule: image_ref must be either a single image or a batch that exactly matches the target's batch size. Mismatched batches raise a ValueError - the message tells you exactly this. Wire in one reference and you're fine.
Third, don't crank strength expecting more magic. Past ~1.5 you start getting clipped, oversaturated casts, especially when the reference and target don't share much composition. Community experience with this same library (it's also what KJNodes' Color Match node wraps) is consistent: similar composition and lighting match far better than wildly different pairs. On a heavily stylized edit you may see "no difference" at strength 1 - that's the library being conservative, not the node being broken.
One more honest note: it's a near-twin of KJNodes' Color Match node. If you already run KJNodes, you might not need this one at all. The README also flags it with a ⚠️ "work in progress" marker, so treat it as a solid utility, not a finished masterpiece.
Install
This ships in the ComfyUI Production Nodes Pack by Uriel Deveaud (KoreTeknology). Install it via ComfyUI Manager (search "ComfyUI Production Nodes Pack"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/KoreTeknology/ComfyUI-Nai-Production-Nodes-Pack
cd ComfyUI-Nai-Production-Nodes-Pack
pip install -r requirements.txt
Then restart ComfyUI. No model downloads; the heavy lift here is the color-matcher and scipy pip packages. The author drops nodes into existing menu categories rather than a new root one, so you'll find ColorMatch2 under image/compositing, not a "KoreTeknology" folder.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image_ref | IMAGE | — | |
| image_target | IMAGE | — | |
| method | COMBO | mkl | 6 options: mkl, hm, reinhard, mvgd, hm-mvgd-hm, hm-mkl-hm |
| strengthopt | FLOAT | 1.000–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |