Color Balance (MD)
The Photoshop Color Balance panel, ported to a ComfyUI node
- image
- mask
- image
People keep asking for this. There's a standing demand in the ComfyUI community for a node that does what the Photoshop Color Balance panel does - separate cyan/magenta/yellow corrections for the shadows, the midtones, and the highlights, so you can cool the shadows without touching the skin tones. mdColorBalance is exactly that, ported from GIMP.
It's the node I'd call the flagship of the MdColorMod pack, because it's the one with a genuine niche: most color nodes in ComfyUI are global sliders, but tonal-range-specific color grading is rare outside the heavy post packs. It lets you push the shadows toward cyan and the highlights toward yellow in one pass - the kind of move that gives a render an actual grade instead of a tint.
How it works
GIMP-style color balance is a per-pixel operation that splits the image into tonal ranges (shadow / midtone / highlight based on luminance) and applies an additive shift in the cyan-red, magenta-green, and yellow-blue axes to each range. Because it works in complementary color pairs rather than raw RGB, it's the natural way to fix a cast or warm an image without the muddy cross-channel shifts a plain channel mixer produces.
The controls that matter
- range - pick Shadow, Midtonnes, or Highlights. (Yes, that's the actual spelling in the dropdown - a charming typo shipped in the enum. Mid-tones, they mean.)
- Cyan-Red, Magenta-Green, Yellow-Blue - three sliders, each -100 to 100. Negative goes toward the first name, positive toward the second. Classic: push Yellow-Blue negative to cool shadows, positive to warm highlights.
- Preserve luminosity (default: on) - keeps brightness stable while shifting hue. Leave it on unless you specifically want the grade to change exposure too.
- jdata - advanced: a JSON string of all three ranges' values (
[[shadow],[mid],[high]]). Ignore it until you're building preset workflows. - image in, image out, optional mask to confine the grade to a region.
Why you'd reach for it
Correcting a cast selectively: skin is a midtone problem, so if skin looks green you can pull midtones magenta-green without wrecking the sky. Or do the film look: cool shadows, warm highlights, done. For making composited or outpainted regions agree with the original frame, this is often the honest alternative to a re-gen - the exact "don't re-roll to fix color" advice in our post-processing notes. The catch with color balance generally: it's only as surgical as you are. Without a mask, "shadows" is a luminance cut, not a region - that's why the mask input exists.
Installing
Standard MdColorMod setup - Manager, search "MdColorMod", or:
cd ComfyUI/custom_nodes
git clone https://github.com/MdONeilsl/ComfyUI-MdColorMod
restart, done. Empty requirements.txt, pure torch, no model downloads, GPL-3.0. It's a young pack with no community buzz yet, so if Manager can't find it, the manual clone is the reliable route.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image tensor. | |
| range | COMBO | Tonal range to adjust: Shadow, Midtones, or Highlights. | |
| Cyan-Red | FLOAT | 0.0-100–100 | Shift towards Cyan (negative) or Red (positive). |
| Magenta-Green | FLOAT | 0.0-100–100 | Shift towards Magenta (negative) or Green (positive). |
| Yellow-Blue | FLOAT | 0.0-100–100 | Shift towards Yellow (negative) or Blue (positive). |
| Preserve luminosity | BOOLEAN | true | Preserve image luminosity when applying the balance. |
| jdata | STRING | [[0,0,0],[0,0,0],[0,0,0]] | JSON string representing adjustment values for all three ranges (advanced). |
| maskopt | MASK | Optional mask to restrict the adjustment area. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The color-balanced image. |