HSL Qualifier
Key a color, shift it, and never touch the rest
- image
- mask
- image
- mask
- hsl_qualifier_info
This is the node for the most common grading move in the book: "I want to change that color, and only that color." Maybe it's a too-yellow sky you want pushed bluer, a green cast on skin, or a neon sign you'd rather be magenta. HSL Qualifier is the MKRShift secondary-color-correction node - pick a hue, define how wide a window around it, and shift only the pixels that match. It's DaVinci Resolve's qualifier stripped down to one node, no tracing, no auto-keying, just the classic HSL picker.
It's in MKRShift Nodes/Color/Tools - the "grab a specific tool, use it, move on" lane of the pack. Where the analyze nodes tell you what's in your image, this one does something about it, and does it with surgical locality instead of a global slider.
How it works
The node converts each pixel to HSL and builds a soft selection matte from three gates: hue_center with hue_width (the color window, in degrees - default center 220 is blue), plus sat_min/sat_max and val_min/val_max to restrain the key to the saturation and brightness range you care about. feather (default 18°) softens the edges of the hue window so you don't get a hard, posterized boundary - this is the knob that separates "clean key" from "visible line around the sky."
Once the matte exists, three shift values do the actual work: hue_shift, sat_shift, val_shift. Everything inside the keyed region gets those shifts applied; everything outside passes through untouched. amount (default 1.0) is the overall blend of the correction, and show_matte is the trick worth knowing: flip it to true and the node shows you the key itself instead of the graded image, so you can see exactly what you're selecting before you commit.
The knobs that matter
It's a settings-JSON node, so the defaults arrive as one string: hue_center 220, hue_width 40, sat_min 0.08, val_min 0.05, feather 18, shifts all 0 except sat_shift 0.25. In practice:
hue_center/hue_width- what you're selecting. Width too narrow and you get banding; too wide and you catch neighboring colors.show_matte- turn on, dial the key, turn off, grade. Do this every time.- The optional
maskinput scopes the whole operation to a region.
Outputs are the graded image, the mask (the selection matte - genuinely useful to wire elsewhere), and an hsl_qualifier_info string.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
then restart, or search MKRShift_Nodes in ComfyUI Manager. No pip requirements, no models.
The classic failure mode: your hue window is a hard band and the shift leaves a colored fringe along the boundary. That's feather's fault - bump it toward 25–30° before you blame the node. And don't try to key near the red/magenta seam (hue is circular, so 0° meets 360°) with a wide window - it wraps around and grabs everything. Set hue_width modest, check the matte, then widen.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| settings_json | STRING | {"hue_center":220.0,"hue_width":40.0,"sat_min":0.08,"sat_max":1.0,"val_min":0.05,"val_max":1.0,"feather":18.0,"hue_shift":0.0,"sat_shift":0.25,"val_shift":0.0,"amount":1.0,"show_matte":false,"mask_feather":12.0,"invert_mask":false} | — |
| maskopt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| hsl_qualifier_info | STRING | — |