Nodes/MdColorMod/Color Components Mono Mixer (MD)
ComfyUI Node

Color Components Mono Mixer (MD)

Mono mixer, the B&W converter that listens

By MdONeilsl·Created 2 months ago·Updated 2 months ago· 0
Color Components Mono Mixer (MD)
  • image
  • mask
  • image
preserve_luminosityfalse
red_multiplier0.33
green_multiplier0.33
blue_multiplier0.33

Plain desaturation gives you a black-and-white image. mdColorCompMonoMixer gives you the one you want - a GIMP Colors → Components → Mono Mixer port that lets you weight how much red, green, and blue contribute to the grayscale result.

This matters more than it sounds. The three channels carry very different perceptual weight - the standard luminance formula is roughly 0.21 red, 0.72 green, 0.07 blue, because the human eye is dominated by green. Use a flat average and you get a different, usually flatter, B&W. The mono mixer is how photographers and graders tune that: crank red up and a red dress goes bright against a dark sky; drop blue and a blue sky goes moody. Same image, completely different black-and-white.

The inputs

  • red_multiplier, green_multiplier, blue_multiplier - each -5 to 5, defaults at 0.333 apiece. That default is the average, not the perceptually-weighted luminance - a subtle point the defaults get "wrong" on purpose so you can see the weighting effect immediately.
  • preserve_luminosity (default: off) - when on, the node normalizes the multipliers so the output keeps the same overall brightness no matter how extreme your weights get. This is the setting you want for photography-style B&W: it stops "crank red" from also blowing the whole image out. Off is the sandbox mode where wild weights do wild things.
  • image in, image out, optional mask - which, unlike most nodes here, acts as a per-pixel strength blend, so you can keep color in one region and go grayscale in another.

When to use it

Two jobs. The first is intentional B&W conversion with tonal control - the sky-too-bright problem, the subject-blends-into-background problem. The second is sneaky: a mono mixer with tuned weights is one of the cleanest ways to build a luminance mask for other work, because you control exactly which channel the mask responds to. (For a general "extract a component" grab-bag, mdColorCompExtract in this pack covers more spaces, but the mixer gives you continuous weight control it can't.)

If you just want "make it gray, don't think," the mdColorDesaturateDesaturate node in this same pack is the simpler call. Reach for the mixer when the result matters - product shots, portraits, anything where B&W is the final look rather than an intermediate.

Installing

Same as every MdColorMod node:

cd ComfyUI/custom_nodes
git clone https://github.com/MdONeilsl/ComfyUI-MdColorMod

or Manager → search "MdColorMod", restart. No Python dependencies (empty requirements.txt), pure torch, no models to download, GPL-3.0. The pack is new enough that Manager may not have it indexed - the manual clone always works.

Categorymd/image/color

Inputs (6)

NameTypeDefaultDescription
imageIMAGEInput image tensor.
preserve_luminosityBOOLEANfalsePreserve the overall luminance after mixing.
red_multiplierFLOAT0.33-5–5Weight for the red channel.
green_multiplierFLOAT0.33-5–5Weight for the green channel.
blue_multiplierFLOAT0.33-5–5Weight for the blue channel.
maskoptMASKOptional mask to restrict the conversion area.

Outputs (1)

NameTypeDescription
imageIMAGEThe grayscale image.