RC Color Match
Steal the color grade from any reference image
- target
- reference
- IMAGE
The fastest way to make an AI image look like it belongs in a series is to give it the same color grade as the others. You could hand-tune curves until they match, or you could feed RC Color Match a reference image and let it do the work. This is the pack's most technically ambitious node: four real color-transfer algorithms - including the LAB statistical matching that Photoshop's "Match Color" approximates - with strength control, luminosity preservation, and gray neutralization.
It's from the RC Image Compositor pack, and unlike most of the pack's adjustments it takes two image inputs: a target and a reference. The target keeps its content; the reference donates its color.
How it works
The method dropdown is where the science lives:
- lab_statistics - PS-style LAB statistical matching, and the default. It computes the mean and standard deviation of the reference in LAB color space and maps the target's LAB statistics onto them. Fast, accurate, and the right first choice for most shots.
- lab_histogram - full histogram matching per LAB channel. Preserves more detail and handles complex grades better, at some cost in naturalness.
- mkl_transfer - Monge-Kantorovitch Linear transfer, a more sophisticated statistical transfer that keeps the result smooth and natural.
- wavelet_hybrid - wavelet + LAB hybrid. The readme calls it "best for textures" - it keeps local structure while transferring the grade, which matters when the reference has strong texture or the target does.
Around the core:
- strength - blends between original and fully matched (0–1). Start at 0.5–0.7; full-strength matches are often too aggressive.
- preserve_luminosity - match only color, not brightness. On by default; turn it off if you want the tonal distribution to match too.
- neutralize - pushes gray tones in the target toward neutral, useful when the reference grade assumes a certain white balance.
- variance_scale - scales the contrast of the match; 1.0 is exact, below 1.0 is flatter, above is punchier.
Output is a single IMAGE tensor.
How to install it
Ships with the RC Image Compositor pack:
cd ComfyUI/custom_nodes
git clone https://github.com/kj863257/ComfyUI_RC_Image_Compositor
cd ComfyUI_RC_Image_Compositor
pip install -r requirements.txt
Restart ComfyUI, or install via ComfyUI Manager by searching "RC Image Compositor". Deps: pillow, numpy, opencv-python. It also handles video batches, per the readme, so frame sequences get a consistent grade.
Common issues
The classic mistake is expecting a match from two images that have nothing in common - a sunny outdoor reference onto a moody indoor target. Color match transfers statistics, not semantics. If your result looks like a teal-and-orange smudge, either your reference's grade is too far from the target's, or preserve_luminosity is off and the brightness mismatch is dominating. Turn preservation on first, then dial strength down.
Second, lab_statistics is fast but can produce flat, gray-ish results when the reference is low-contrast. That's the variance_scale moment - push it above 1.0 to restore snap.
And a workflow tip: this node is also the secret weapon for matching a generated image to a real photograph's grade, which is how people make AI output sit naturally in a photo series. Match first, then do a final pass with RC Color Balance or RC Curves to taste.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| target | IMAGE | Target image to be color matched | |
| reference | IMAGE | Reference image to match colors from | |
| method | COMBO | lab_statistics | Color matching method: - lab_statistics: PS-style LAB statistical matching (fastest, most accurate) - lab_histogram: LAB histogram matching (better detail preservation) - mkl_transfer: Monge-Kantorovitch Linear transfer (natural, smooth) - wavelet_hybrid: Wavelet + LAB hybrid (best for textures) |
| strength | FLOAT | 1.000–1 | Blend strength between original and matched (0=original, 1=fully matched) |
| preserve_luminosity | BOOLEAN | true | Preserve original luminosity (only match colors, not brightness) |
| neutralize | FLOAT | 0.000–1 | Neutralize gray tones in target image |
| variance_scale | FLOAT | 1.000.1–2 | Scale the variance/contrast of the match (1.0=exact match) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |