Nodes/AK Pack/AK Contrast & Saturate Image
ComfyUI Node

AK Contrast & Saturate Image

A tiny color grade for the end of your graph

By akawana·Created 9 months ago·Updated 8 days ago· 2
AK Contrast & Saturate Image
  • image
  • image
brightness0
contrast0
master0
reds0
yellows0
greens0
cyans0
blues0
magentas0

AK Contrast & Saturate Image is the "make it pop slightly before I save it" node. You decode your latent, maybe you upscale, and the image is almost what you want - the colors are a little flat, the reds a little muddy. This node is a three-second color grade sitting right in the graph, no external tools, no heavy dependencies.

The useful part is that it's not just a brightness/contrast slider plus one big saturation knob. The saturation side is split into six hue bands - reds, yellows, greens, cyans, blues, magentas - with a master control on top. So you can nudge skin-tone reds up without turning the whole image into candy, or cool off the cyans without touching the rest. That's the kind of control that usually means opening a photo editor; here it's one node you can re-run every batch.

How it works. Brightness and contrast get applied first, straight in RGB space (contrast is a simple (v − 0.5) × factor + 0.5 around mid-gray). Then the image converts to HSV and saturation is adjusted per hue band. The bands are soft, with feathered edges of about 15 degrees, so the transition between "reds affected" and "nothing affected" is gradual rather than a hard band that leaves visible seams. Each slider runs from −100 to +100 and maps to a saturation multiplier, so 0 is untouched, positive saturates, negative desaturates toward gray.

There's also a nice fast path baked in: if every slider is at 0 the node returns your image untouched without doing any of the conversion work, so leaving it in the graph when you're not grading costs you almost nothing.

The inputs. image plus nine integer sliders:

  • brightness and contrast - global, in RGB.
  • master - overall saturation.
  • reds, yellows, greens, cyans, blues, magentas - the six hue bands.

Everything defaults to 0, which means the node does nothing until you move something. One output, image, same shape as the input - drop it right before your Save Image or before a final detailer pass.

How to install. ComfyUI Manager (search "AK Pack") or:

cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-Utils-extra

Then restart ComfyUI. No pip installs, no models - it's just numpy and PIL, which ComfyUI already has.

Where people get burned. This node expects a straight RGB IMAGE tensor - the code raises an error if you feed it something with four channels. So don't pipe an RGBA image from a "replace color with alpha" node straight in; strip the alpha first (or feed it before you add transparency). And remember the sliders are integer steps, not fine floats - a ±1 step is fine for saturation but a bit coarse if you wanted a 0.3% brightness tweak. For anything subtler, you're honestly better off with a proper image-editing node.

CategoryAK/image

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
brightnessINT0-100–100
contrastINT0-100–100
masterINT0-100–100
redsINT0-100–100
yellowsINT0-100–100
greensINT0-100–100
cyansINT0-100–100
bluesINT0-100–100
magentasINT0-100–100

Outputs (1)

NameTypeDescription
imageIMAGE