Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-Darkroom > Color Match (Reference)

ComfyUI Node: Color Match (Reference)

Class Name

DarkroomColorMatch

Category
AKURATE/Darkroom/Grading
Author
jeremielouvaert (Account age: 5084days)
Extension
ComfyUI-Darkroom
Latest Updated
2026-10-05
Github Stars
0.13K

How to Install ComfyUI-Darkroom

Install this extension via the ComfyUI Manager by searching for ComfyUI-Darkroom
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Darkroom in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Color Match (Reference) Description

Matches an image's colour to a reference using selectable methods and adjustable strength.

Color Match (Reference):

DarkroomColorMatch adjusts an image’s overall colour character to resemble a reference image. It is useful for bringing images from different sources into a more consistent visual style or borrowing the colour feel of an image you like. You can choose among a fast, broad colour adjustment, a method intended for more varied colour distributions, and methods based on colour palettes or Gaussian colour distributions. The strength of the adjustment is controllable, so you can retain some of the original appearance rather than applying the full match.

Color Match (Reference) Input Parameters:

image

The IMAGE to colour-grade. This is the target whose appearance changes; the node can process a batch of target images, applying the same reference to each frame. This input has no numeric minimum, maximum, or default in the provided interface.

reference

The IMAGE whose colour character guides the match. If you provide a batch as the reference, only its first frame is used for every target frame. Choose an image with the colour appearance you want to borrow; the reference guides the grading rather than becoming the output image. This input has no numeric minimum, maximum, or default in the provided interface.

method

Selects how the colour match is calculated. The options are reinhard, a fast match based on broad colour averages and variation; wasserstein, a method intended to handle more varied colour distributions; forgy, a palette-based K-means method; and kantorovich, a Gaussian optimal-transport method. The default is reinhard. Method choice affects the kind of match produced and which optional settings matter. If the selected method is unavailable, the node logs a warning and uses reinhard instead.

intensity

Controls how much of the calculated colour match appears in the result by blending it with the original target. At 0.0, the node returns the input image unchanged; at 1.0, it uses the full calculated match. Values in between keep a proportion of the original appearance—for example, 0.5 blends the original and matched versions. The default is 0.8, the minimum is 0.0, the maximum is 1.0, and the interface step is 0.05.

n_colors

An optional setting for forgy only: the number of colours in the palette used for matching. It does not affect the other methods. The default is 8, the minimum is 4, the maximum is 16, and the interface step is 1. Adjust it when using forgy to change the palette size considered by that method.

n_slices

An optional setting for wasserstein only. It controls the number of advection iterations used by that method and does not affect the other methods. The default is 20, the minimum is 4, the maximum is 200, and the interface step is 2. You can adjust it to change how extensively the Wasserstein method performs its matching.

sample_size

An optional limit on the number of pixels sampled for fitting when using wasserstein, forgy, or kantorovich. It does not affect reinhard. The default is 50000, the minimum is 5000, the maximum is 500000, and the interface step is 5000. A smaller setting asks these methods to fit from fewer pixels; a larger setting lets them consider more sampled pixels.

seed

An optional random seed used by wasserstein, forgy, and kantorovich to make their sampling-based behaviour repeatable when you keep the settings the same. The node does not pass it to reinhard. The default is 42, the minimum is 0, and the maximum is 4294967295. Keep the seed fixed while comparing other settings, or change it to try a different sampling outcome.

Color Match (Reference) Output Parameters:

image

The resulting IMAGE, in the same target-frame order as the input batch. Each target frame is matched against the first reference frame, then blended with its original appearance according to intensity. At 0.0 intensity, this output is the original input image returned unchanged. Otherwise, it represents the selected method’s colour adjustment at the chosen strength; it is not a copy of the reference image.

Color Match (Reference) Usage Tips:

  • Start with reinhard and the default 0.8 intensity for a quick overall colour match. Lower intensity if the result changes too much of the target’s original look.
  • For a full-strength comparison between methods, set intensity to 1.0. Return it to a lower value if you prefer a subtler grade.
  • Try wasserstein when you want to test a method intended for more varied colour distributions. Its n_slices setting applies only to that method; begin at the default 20 before changing it.
  • Use forgy when you want palette-based matching, and adjust n_colors from its default 8 to change the palette size. For wasserstein, forgy, and kantorovich, start with the default sample_size and change it if you need a different sampling limit.
  • If you process a batch, place the reference look you want to use in the first reference frame. Keep seed fixed when comparing settings for the sampling-based methods.

Color Match (Reference) Common Errors and Solutions:

[Darkroom] Color Match: `{method}` unavailable (`{reason}`); falling back to reinhard

  • Explanation: This is a warning, not a stop error. The selected method is unavailable, and the node uses reinhard instead, so the result may differ from the method you selected. The logged {reason} provides the availability detail.
  • Solution: Read the reason in the console. Select reinhard if you want to proceed without the unavailable method, or resolve the reported availability issue before trying that method again.

No visible colour change

  • Explanation: At intensity 0.0, the node returns the input image unchanged without calculating a match. At other strengths, the change may be subtle, particularly if the target and reference already have similar colour character.
  • Solution: Set intensity above 0.0. Temporarily use 1.0 to inspect the full match, then lower it to the strength you prefer.

The batch matches an unexpected reference frame

  • Explanation: The node uses only the first frame of reference for every target frame. It does not pair successive reference frames with successive target frames.
  • Solution: Put your intended reference in the first frame, or run separate matches when different target frames need different references.

n_colors or n_slices has no effect

  • Explanation: n_colors is passed only to forgy, while n_slices is passed only to wasserstein. Neither setting changes reinhard; neither will affect the result if the chosen method is unavailable and falls back to reinhard.
  • Solution: Select the method associated with the setting and check the console for a fallback warning.

Color Match (Reference) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Darkroom
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Color Match (Reference)