Nodes/comfyui_color_detection/Generate Yellow Heatmap
ComfyUI Node

Generate Yellow Heatmap

See the Yellow Cast Instead of Guessing Where It Is

By purewater2011·Created about a year ago·Updated about a year ago· 1
Generate Yellow Heatmap
  • image
  • IMAGE
threshold140.0

Its sibling node IsYellowish tells you whether your image is yellow-tinted. YellowHeatmap is the show-your-work version: it paints the cast onto the image so you can see where it lives. Both come from the same comfyui_color_detection pack, use the same trick, and are just as dead-simple to run - you swap a number output for an IMAGE you can wire straight into a preview.

Reach for it when a portrait looks warm and you want to know if the yellow is in the skin, smeared across the whole frame, or hiding in a background that's dragging everything sideways. That's the difference between "fix the subject" and "fix the white balance," and squinting doesn't answer it. A heatmap does.

How it works

Same pipeline as IsYellowish, minus the verdict: the image goes from ComfyUI's RGB tensor to BGR and into the LAB color space, whose b channel is the blue→yellow axis (neutral at 128). Then things get visual:

  1. The b channel is normalized so that 128 (neutral) maps to 0 and 255 maps to 1.
  2. That normalized map runs through OpenCV's JET colormap - so the strongest yellow pixels come back red, milder warm areas cycle through yellow/green, and near-neutral areas are dark blue.
  3. A mask keeps only the pixels above your threshold and blanks the rest.
  4. The result is blended over the original: 70% image, 30% heatmap.

End product: your photo with a false-color "temperature map" glowing on the parts that actually read as yellow.

The input and output

Two inputs, one you actually set:

  • image - a standard ComfyUI IMAGE.
  • threshold (default 140, min 128, max 160) - identical to IsYellowish: how warm a pixel must be before it counts as yellow. 128 is the neutral floor (the author clamped it so you can't mark everything), 140 is the sensitive default, and 160 only lights up seriously warm regions. This is the dial you'll turn while tuning the map to match what your own eye calls yellow.

The output is a single IMAGE - drop it into a PreviewImage or SaveImage node. That's the whole contract.

What it's actually good for

  • Locating the cast. Face warm but background neutral? That's a skin-tone or lighting problem, not a white-balance one. Whole frame lit up? Your VAE or color-grading step shifted everything.
  • Verifying a fix. Run a color-correction node, then run the heatmap again - the glowing region should shrink. That's a much more satisfying before/after than eyeballing two JPEGs.
  • Tuning the threshold on IsYellowish with the same pack. Adjust the heatmap until the highlight matches your intuition, then feed that number back to the boolean node.

Install and gotchas

Same pack, same story as IsYellowish - ComfyUI Manager search "Yellow Detection", or:

cd ComfyUI/custom_nodes/
git clone https://github.com/purewater2011/comfyui_color_detection

then restart. No models to download; the only dependencies are opencv-python, numpy, and pillow, which you almost certainly already have.

Two things worth knowing before you rely on it:

  • It's a single-image node - the code squeezes the input tensor, so feed it one frame at a time, not a batch.
  • It's a debug overlay, not a color grade. The un-highlighted areas get dimmed slightly (they're blended 70% toward black), and JET is a false-color map - the red isn't "the image is red here," it's "the yellow is strongest here." Preview it to understand the image; don't ship the output as your final render.
Categoryimage/analysis

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
thresholdFLOAT140.0128–160

Outputs (1)

NameTypeDescription
IMAGEIMAGE