Nodes/ComfyUI-Darkroom/White Balance
ComfyUI Node

White Balance

The temperature slider, done properly

By jeremieLouvaert·Created 5 months ago·Updated 2 days ago· 101
White Balance
  • image
  • image
temperature6500
tint0.00
strength1.00

Every image has a color cast, and ninety percent of the time the cast is a white balance problem: shot under tungsten, the image is orange; under shade, it's blue. The fix is the oldest trick in photography - tell the software what temperature the light was - and White Balance is that as a proper node: a Kelvin temperature slider plus a green-magenta tint correction, grounded in the physics of black-body radiation.

How it works

The node implements color temperature through a Planckian locus approximation - that's the smooth curve of colors a perfect black-body radiator emits as it heats up. Cool it down and it goes orange-red (that's why "warm" light is low temperature); heat it up and it goes blue-white. Set the temperature to what the light should have been, and the node shifts the image accordingly:

  • Lower Kelvin = warmer. Dropping from 6500 to 4500 makes a daylight image look like it was shot at golden hour.
  • Higher Kelvin = cooler. Raising toward 9000+ pushes the image into cool, blue shade-light territory.

The correction happens via a von Kries-style scaling in linear light (matching the pack's "everything in linear" architecture), so it behaves like real white balancing rather than a flat tint overlay.

The tint slider handles what temperature can't: green-magenta casts, which no black-body curve produces. Negative tint pushes green, positive pushes magenta. Fluorescent lighting is the classic offender - it reads neutral to the eye but photographs green, and temperature alone can't fix it. That's why every camera and editor pairs the two controls.

The inputs

  • temperature - 2000–12000 Kelvin, default 6500 (daylight). In 100-step increments.
  • tint - −1 to +1, default 0. Negative = green, positive = magenta.
  • strength - the universal blend back to the original (0–1). This one matters more than on most nodes: white balance at full strength is often too aggressive on an image you want to keep slightly warm, and backing to 0.5–0.8 gives you "corrected but still moody."

Output is a single image.

How to use it

The lazy but effective method: if the image is obviously orange, drop temperature; if it's obviously blue, raise it; if it's green, nudge tint negative. Go a step at a time and watch skin tones - skin is the best neutral reference the human eye has.

If you don't know the cast, the pack's Auto White Balance node estimates it for you (Gray World / White Patch / Shades of Gray / Gray Edge methods). The division of labor is clean: Auto WB when you don't know, this node when you do. And this node has one advantage Auto WB can't touch: it's not content-adaptive. It's a per-pixel transform based purely on your inputs, which makes it one of the nodes the README allows inside a LUT bake chain. You can bake a specific Kelvin correction into a .cube and reuse it everywhere.

Where it fits

It's a Raw-subcategory node: run it right after Exposure & Tone, before you grade creatively. Getting white balance right early is what makes everything downstream - skin tone uniformity, color matching, film stock emulation - behave predictably. Grade on a wrong-WB image and you'll fight the cast through every later node.

Installing it

Part of the full ComfyUI-Darkroom pack:

cd ComfyUI/custom_nodes
git clone https://github.com/jeremieLouvaert/ComfyUI-Darkroom.git
pip install -r ComfyUI-Darkroom/requirements.txt

Or search "Darkroom" in ComfyUI Manager. Needs scipy, opensimplex, rawpy, exifread, Pillow. Restart and it's under AKURATE/Darkroom/Raw. No GPU, no models, no API - it's Planckian math in numpy.

Not a flashy node, but it's the difference between a cast that fights you all the way down the pipeline and a clean neutral base. Reach for it first.

CategoryAKURATE/Darkroom/Raw

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
temperatureINT65002000–12000Color temperature in Kelvin. Lower=warmer, higher=cooler
tintFLOAT0.00-1–1Green-magenta tint. Negative=green, positive=magenta
strengthFLOAT1.000–1Blend between original (0) and adjusted (1)

Outputs (1)

NameTypeDescription
imageIMAGE