Color Match/Transfer
Steal the Grade, Not the Image
- image
- reference
- result
The fastest way to match the look of a reference photo is to not generate from scratch - it's to copy its color statistics onto your image. Color Match/Transfer is that trick as a node: feed it your image plus a reference, and it reshapes the color distribution of the first to resemble the second. For texture work it's a one-shot way to make a freshly generated albedo sit visually inside the same material family as an existing texture set, or to pull a photo's palette onto a stylized material.
It's part of the color toolbox in amtarr/ComfyUI-TextureAlchemy, and it's one of the few nodes here that isn't instant tensor math on a single image - it computes statistics across both inputs. Still fast, still no model, just smarter.
How it works
You get two matching modes, and the difference is worth knowing:
- mean_std - for each RGB channel it computes the mean and standard deviation of the reference, then re-centers and rescales your image's channels to match. Fast, robust, and great when the reference is a clean, well-exposed photo. This is the mode you'll default to.
- histogram - a fuller histogram-matching pass that tries to replicate the reference's entire value distribution per channel, not just mean and spread. Better when the reference has a distinctive tonal shape (crushed shadows, film roll-off), slower, and occasionally noisier on images with big flat areas.
Either way, the result is blended with the original by strength, so at strength: 0.5 you get a halfway point between your image and the color-matched version.
The inputs that matter
image- what you're recoloring.reference- what you're stealing the grade from. This is the one that matters: a bad reference gives you a bad match, so pick one with the palette you want, not just a mood.strength(0–1, default 1.0) - how far to push toward the match. Backing this off to 0.4–0.7 is the secret to a "natural" result rather than a violent recolor.mode- mean_std or histogram.
Output is result, a single IMAGE.
Where it slots in
A typical TextureAlchemy chain: extract an albedo from a photo with Marigold, realize it's a different cast than your existing material library, and run it through Color Match/Transfer against the library's albedo to unify the set. Or take a stylized texture and match it to a photographic reference so the baked-in palette matches reality. It's also a legitimately good quick color-grade for source cleanup before PBR extraction - a consistent grade makes for more consistent normals.
Installing it
Same pack, one install:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
restart, and it's under Texture Alchemist → Color. ComfyUI Manager: search "Texture Alchemy". No extra pip deps.
Gotchas
The classic failure mode: matching against a reference with wildly different luminance than your image and wondering why the result looks like a smear. mean_std rescales per channel, so a much brighter reference will blow out your shadows - that's what strength is for. And don't expect it to fix a fundamentally different scene; it transfers color statistics, not content. Also note the two inputs aren't interchangeable - swapping image and reference gives you a different (and usually wrong) result, and the node won't warn you.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| reference | IMAGE | — | |
| strength | FLOAT | 1.000–1 | — |
| mode | COMBO | 2 options: mean_std, histogram |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | IMAGE | — |