Nodes/ComfyUI-Apt_Preset/color_balance_adv
ComfyUI Node

color_balance_adv

Color balance with a lock so skin tones survive the grade

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
color_balance_adv
  • image
  • mask
  • image
cyan_red0.000
magenta_green0.000
yellow_blue0.000
lock_colorfalse
lock_color_hex#000000
lock_color_threshold10
lock_color_smoothness0
mask_smoothness0

The core of this node is the classic three-way color balance you know from Photoshop or the basic wheels in Resolve - cyan-red, magenta-green, yellow-blue sliders, applied globally, no shadows/midtones/highlights split. What makes it worth a dedicated article is lock_color: pick a hex color, a tolerance, and an edge softness, and that color range gets excluded from the balance shift entirely.

The obvious use is grading a whole shot warmer or cooler while keeping skin tones from sliding toward orange or green - the single most common complaint about heavy-handed color grading on anything with people in it. This node bakes the fix in as a toggle instead of making you paint a protection mask by hand every time. It lives under Apt_Preset/image/color_adjust.

How it works

cyan_red, magenta_green, and yellow_blue shift the whole image along each axis. When lock_color is on, pixels near lock_color_hex (within lock_color_threshold) get excluded from that shift, with lock_color_smoothness feathering the edge of the exclusion so you don't get a hard cutout. mask plus mask_smoothness layer an additional, independent region restriction on top.

The inputs and outputs that matter

  • cyan_red / magenta_green / yellow_blue (-1 to 1, step 0.001, default 0) - fine-grained; small moves matter more than you'd expect.
  • lock_color (boolean, default false) - off by default, so the sliders act globally until you flip this on.
  • lock_color_hex (default #000000) and lock_color_threshold (0-255, default 10) - tight by default, meaning only close matches to the hex get protected unless you widen it.
  • lock_color_smoothness (0-128) - feathers the lock boundary.
  • Optional mask and mask_smoothness (0-128) - a separate, mask-based restriction independent of the color lock.
  • image in, image out.

How to install it

Through ComfyUI Manager: search "ComfyUI-Apt_Preset", install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

then run install.bat (Windows) or install requirements manually on Linux/Mac, and restart. No model downloads needed.

Common issues & troubleshooting

lock_color doesn't seem to protect anything. It's off by default - check the boolean is actually toggled true before assuming the feature is broken.

The locked region has a visible hard edge. Raise lock_color_smoothness; the default relies on you dialing it in for your specific image.

Nothing happens at all. cyan_red/magenta_green/yellow_blue all default to 0, which is neutral - you have to move at least one before there's anything to see.

Skin tones still shift a bit even with the lock on. lock_color_threshold defaults to a tight 10 - real skin has more tonal variation than a single hex match catches at that tolerance, so widen the threshold (and lean on lock_color_smoothness) rather than expecting a pixel-perfect match at defaults.

IMPORT FAILED on the pack. ComfyUI-Apt_Preset is large and updates often; users have reported import failures after some updates. Reinstall via Manager before assuming it's this node.

CategoryApt_Preset/image/color_adjust

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
cyan_redFLOAT0.000-1–1
magenta_greenFLOAT0.000-1–1
yellow_blueFLOAT0.000-1–1
maskoptMASK
lock_coloroptBOOLEANfalse
lock_color_hexoptSTRING#000000
lock_color_thresholdoptINT100–255
lock_color_smoothnessoptINT00–128
mask_smoothnessoptINT00–128

Outputs (1)

NameTypeDescription
imageIMAGE