Color Hue-Saturation (MD)
Per-color grading in one node
- image
- mask
- image
This is the heavyweight of the MdColorMod pack - the one that does what everyone actually wants from a color node: change the greens without touching the skin. mdColorHueSaturation is GIMP's Hue-Saturation dialog ported to ComfyUI, and it gives you per-hue-band control over hue, lightness, and saturation.
The idea
Instead of one global saturation slider, the color wheel is split into six hue bands - Red, Yellow, Green, Cyan, Blue, Magenta - plus a Master band that affects everything. You pick a band, adjust its hue/lightness/saturation, and only pixels whose hue falls in that band change. Want the grass greener but the flowers untouched? Select Green, pull saturation. The sky bluer, nothing else? Blue band. This is the tool for the "close, but the one color is wrong" problem that makes people re-roll a generation - a problem our post-processing notes say you should never solve with a re-roll when a deterministic grade exists.
The controls that matter
- color - the band selector (Master, Red, Yellow, Green, Cyan, Blue, Magenta).
- Overlap (0-100, default 0) - how much neighboring hues get caught in the adjustment. At 0, band edges are hard; at higher values the effect bleeds into adjacent hues so a Green adjustment doesn't leave a visible ring where greens stop. Start at 20-30 and you'll usually avoid banding artifacts.
- Hue (-180 to 180), Lightness (-100 to 100), Saturation (-100 to 100) - apply to the selected band.
- jdata - the advanced input: a JSON
7×3matrix encoding all bands'[hue, lightness, saturation]in one go. If you're building reusable presets or driving this from a script, that's your vector. Ignore it entirely otherwise. - image in (RGB or RGBA), image out, optional mask - which here can be a luminance-based mask to limit the effect's range.
How to not get burned
Two failure modes to know. First, hard band edges: with Overlap at 0, adjusting Green hard can leave a visible seam where greens meet blues - that's the "ringing" complaint, and Overlap is the fix. Second, hue math: a hue shift of +30 on the Red band is a rotation, not a repaint - colors near the band edge get caught unevenly at low Overlap. If the result looks like a mask is floating over the image, raise Overlap before you blame the node. And note the jdata tooltip's warning: the slider inputs are overridden when a valid jdata string is present, so if your sliders appear dead, check whether a preset jdata got wired in.
Installing
Standard:
cd ComfyUI/custom_nodes
git clone https://github.com/MdONeilsl/ComfyUI-MdColorMod
or ComfyUI Manager → "MdColorMod", restart. Empty requirements.txt, pure torch, no downloads, GPL-3.0. It's a new pack - if Manager can't find it, the manual clone always works.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image tensor (RGB or RGBA). | |
| color | COMBO | Master | Select a specific hue band for the slider controls (overridden by jdata if valid). |
| Overlap | FLOAT | 0.00–100 | Overlap spread percentage (0-100) for blending neighbouring hues. |
| Hue | FLOAT | 0.0-180–180 | Hue shift for the selected hue band (ignored if jdata is used). |
| Lightness | FLOAT | 0.0-100–100 | Lightness shift for the selected hue band (ignored if jdata is used). |
| Saturation | FLOAT | 0.0-100–100 | Saturation shift for the selected hue band (ignored if jdata is used). |
| jdata | STRING | [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]] | JSON string representing a 7×3 matrix of [Hue, Lightness, Saturation] adjustments for Master and six hues. |
| maskopt | MASK | Optional mask to restrict the adjustment area. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The hue/saturation adjusted image. |