🌊Trix Color Match
Eleven ways to steal a palette, one of which you'll actually use
- image
- reference
- mask (preview only)
- image
🌊Trix Color Match does one thing: it takes your image, takes a reference image, and reshapes your image's color statistics to match the reference's. No model involved, no sampler rerun - a deterministic pixel pass that runs in a fraction of a second. It ships inside ComfyUI-TrixNodes, the Trix pack you might have installed for the bypassers and animated wire-hiding, but honestly it's the kind of node you reach for even if you never touch the rest of the suite.
Color matching is the underrated post step. It's the honest fix for three jobs people keep doing by hand: making an outpainted or inpainted region agree with the original photo around it, making an upscaled tile match its neighbors, and making a composited subject sit in a new background's light. It's also the correct answer to "the colors are off" - a statistics transfer is instant and deterministic, where re-rolling the seed is a lottery.
How it works
The node does a mean/standard-deviation transfer in a chosen color space, plus a few fancier variants. The method dropdown gives you eleven entries, which is choice overload, so here's the honest map:
- LAB (default) and RGB - classic mean/std transfer in Oklab and RGB space. LAB is the one you want 90% of the time; it moves contrast and color without the flat, bleached look RGB tends to give.
- Histogram - per-channel histogram matching. More aggressive, better at forcing the exact tonal distribution of the reference.
- wavelet - the WCT-style trick: it keeps your image's high-frequency detail and swaps in the reference's low-frequency color. Useful when mean/std leaves your detail feeling off.
- adain - adaptive instance normalization, straight out of the style-transfer literature. "Color" done as if the reference were a style painting.
- mkl, reinhard, mvgd, hm, hm-mvgd-hm, hm-mkl-hm - these delegate to the
color-matcherPython library (Monge-Kovalev, Reinhard, multivariate Gaussian, histogram, and chained hybrids). Reinhard is the classic from the 2001 paper; mkl is the one people actually pick.
That's your starter plan: LAB, and if it's not enough, Reinhard, then Histogram.
The inputs that matter
You need two images: image (what gets changed) and reference (the look you want). Then:
target-Allapplies the full match.Lightnesstakes the reference's brightness/contrast but keeps your colors;Colorkeeps your brightness and steals the reference's colors. Great for "same light, different mood" edits.strength- 0 to 1 blend between the original and the matched result. Default 1. Pull it to 0.4-0.6 when a full match is too aggressive; you'll use this a lot.device-autopicks Comfy's managed device, or force cpu/gpu.preview_mode-show,hide, or the nice ones:show before-afterandshow compare reference, which render the comparison right on the node via the pack's web UI.
It outputs a single IMAGE, which you wire straight into a Save Image, another filter, or an upscale. Batches work - each frame gets matched against the reference frame.
Where people get burned
The mask is the trap. mask (preview only) is named honestly: it only affects what the preview shows you, so you can eyeball a region match before committing. The output image is never masked. If you want the match restricted spatially, you'll need to composite the result against the original with a separate mask node.
Second trap: the six color-matcher methods aren't pure Python in the pack. They import the color-matcher library, which is not in the pack's requirements. Pick mkl before installing it and you'll silently get LAB instead, with a message buried in the console.
Install
Via ComfyUI Manager, search ComfyUI-TrixNodes (publisher trix7111) and install, then restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/trx7111/ComfyUI-TrixNodes
Note the README's own manual-install section still points at an old pixaroma/ repo URL - that account is dead, the pack lives at trx7111. If you want the six matcher methods:
cd ComfyUI/custom_nodes/ComfyUI-TrixNodes
pip install color-matcher
If you're only here for this node, don't be surprised that installing the pack pulls in ctranslate2, huggingface_hub and deep_translator - those belong to the pack's Prompt AIO translator, not the color matcher. Annoying, but harmless. Restart ComfyUI, add the node from the image/processing category, and steal yourself a palette.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| reference | IMAGE | — | |
| method | COMBO | LAB | 11 options: LAB, RGB, Histogram, wavelet, adain, mkl, +5 |
| target | COMBO | All | 3 options: All, Lightness, Color |
| strength | FLOAT | 1.000–1 | — |
| device | COMBO | auto | 3 options: auto, cpu, gpu |
| preview_mode | COMBO | show | 4 options: show, hide, show before-after, show compare reference |
| mask (preview only)opt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |