Color Components Channel Mixer (MD)
The node that makes every other color node feel blunt
- image
- mask
- image
The channel mixer is the node that looks like overkill until you need it, and then nothing else will do. mdColorCompChannelMixer gives you a 3×3 matrix - for each output channel (R, G, B), you decide how much of each input channel contributes. That's nine sliders and it is a lot of power.
What you'd actually use it for
The classic use is black-and-white conversion. Standard desaturation is one formula applied to everyone; the channel mixer lets you say "make the sky darker by underweighting blue" - the single most common professional B&W move in every photo editor since 1995. Dial Red_in_green and Red_in_blue down, and the red channel in your output leans on green and blue less, so red objects pop differently.
The second use is creative color shifts. Want to swap a red shirt to green by editing values? Pull Red_in_green up and Green_in_red down - it's a crude hue remap that keeps luminance structure, unlike a flat overlay. The third use is correction: fixing a cast by pulling specific channel contributions, though for that the color balance node in this same pack is usually the friendlier tool.
The inputs that matter
Nine coefficients, named [Channel]_in_[channel] (e.g. Red_in_red, Green_in_red, Blue_in_red for the output red channel), each -2 to 2 with defaults of 1 on the diagonal and 0 elsewhere - so the node starts as a no-op. Plus:
- Preserve_luminosity (default: off) - when on, it rescales the mix to keep overall luminance constant, so cranking weights changes color but not exposure. For B&W work this is the "don't blow out the highlights" insurance.
- image in, image out, optional mask.
The thing to know about a channel mixer: it's perceptual. Off-diagonal values change what the image looks like in ways that don't map to "redness" intuitively. The tooltip on each slider says exactly which channel it steers, and that's the map you want: read the input, tweak one coefficient, look, repeat.
The honest caveat
A channel mixer is the wrong first tool for most jobs. For "make it warmer" use color balance or white balance; for "make it gray" use the desaturate node - which, conveniently, lives in this same pack and handles the luminance math for you. Channel mixers are for when you want control over the mix itself, not a one-dimensional slider. When you do want that, this node is a faithful GIMP Colors → Components → Channel Mixer port: RGB/RGBA, mask support, alpha preserved, batch-chunked.
Installing
Standard MdColorMod install:
cd ComfyUI/custom_nodes
git clone https://github.com/MdONeilsl/ComfyUI-MdColorMod
or search "MdColorMod" in ComfyUI Manager, then restart. Empty requirements, pure torch, no model files, GPL-3.0. The pack is young and barely has a community footprint - if Manager hasn't indexed it, clone manually and refresh.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image tensor. | |
| Red_in_red | FLOAT | 1.00-2–2 | Contribution of red channel to output red. |
| Green_in_red | FLOAT | 0.00-2–2 | Contribution of green channel to output red. |
| Blue_in_red | FLOAT | 0.00-2–2 | Contribution of blue channel to output red. |
| Red_in_green | FLOAT | 0.00-2–2 | Contribution of red channel to output green. |
| Green_in_green | FLOAT | 1.00-2–2 | Contribution of green channel to output green. |
| Blue_in_green | FLOAT | 0.00-2–2 | Contribution of blue channel to output green. |
| Red_in_blue | FLOAT | 0.00-2–2 | Contribution of red channel to output blue. |
| Green_in_blue | FLOAT | 0.00-2–2 | Contribution of green channel to output blue. |
| Blue_in_blue | FLOAT | 1.00-2–2 | Contribution of blue channel to output blue. |
| Preserve_luminosity | BOOLEAN | false | Preserve the overall luminance after mixing. |
| maskopt | MASK | Optional mask to restrict the adjustment area. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The channel-mixed image. |