Image Color Adapter
Stealing the Color Grade From One Image and Giving It to Another
- image
- color_ref_image
- image
You've generated an image you like, but the color mood is wrong - too clinical, too flat, not the warm cinematic grade you had in your head. ImageColorAdapter fixes that the lazy way: you give it your image plus a reference image whose look you want, and it transplants the reference's color statistics onto your image. It's color grading by theft, and it's remarkably effective for pushing generated images toward a photographic look.
How it works
The mechanism is a classic color-transfer technique that works in LAB color space. LAB separates an image's lightness from its color channels, which makes it ideal for this: the node converts both images to LAB, measures each channel's mean and standard deviation, then rescales your image's color distribution to match the reference's - (image − mean) · (ref_std / image_std) + ref_mean. In plain terms: it makes your image's average color and color range line up with the reference's, while keeping your image's own structure intact.
Then comes the safety knob: the result is blended back onto the original at your chosen opacity (0–100, default 75), so you can dial the effect from "a hint of warmth" to "full recoloring" without a second node. At the default 75 you get a strong but not total transfer.
The inputs that matter
image- what gets recolored.color_ref_image- where the color comes from. Any image with the grade you want.opacity- the blend strength, 0 to 100. Start low, nudge up.
Output is a single image. One nice detail in the source: if your batch is longer than the reference set, the last reference repeats to cover the rest, so you can grade a whole batch against one reference without padding anything.
Where it shines
This is a goto for the "AI look" problem - the flat, plasticky palette that reads as generated. Grading against a reference photo or a well-lit film still pushes output toward photorealism in a single step, which is exactly the kind of finishing touch the photorealism crowd spends ages on. It also handles the reverse: warm up or cool down a whole batch consistently, then hand the result to a save node or further post-processing.
Gotchas
It matches color distribution, not lighting structure - a high-contrast reference will pull your image's contrast toward it, and a reference with a strong dominant cast can overshoot the grade. That's what opacity is for. And if your reference is a tiny thumbnail, the statistics get coarse; a clean reference of reasonable size grades more predictably.
Installing it
From windfancy/zsq_prompt - ComfyUI Manager, search "zsq_prompt", install, restart; or:
cd ComfyUI/custom_nodes
git clone https://github.com/windfancy/zsq_prompt
then restart. Note this node genuinely uses OpenCV (the LAB conversion), and the pack installs opencv-contrib-python - if that fights an opencv you already had, that's the one real dependency clash to watch for. And the usual Manager "conflict" flag on zsq_prompt is the generic-class-name issue; ignore unless you're running the other pack too.
Verdict
The color-grade tool in the pack most likely to make your images look intentional. Cheap, one node, and the opacity dial keeps it from ever going too far.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| color_ref_image | IMAGE | — | |
| opacity | INT | 750–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |