Nodes/Radiance/White Balance
ComfyUI Node

White Balance

Fix a cast with a Kelvin number, not a guess

By FXTD-Studios·Created 9 months ago·Updated 3 days ago· 249
White Balance
  • image
  • ocio_context
  • image
  • grade_info
◄modeTemperature / Tint►
◄presetManual►
◄temperature6500►
◄tint0.000►
◄src_illuminantD65►
◄dst_illuminantD50►
◄gain_r1.000►
◄gain_g1.000►
◄gain_b1.000►
◄strength1.00►
◄grade_info_in—►

If your image is too orange or too blue, you don't need a color wheel and a prayer - you need to know what temperature the light was. ◎ Radiance White Balance fixes casts the way a camera does: in Kelvins. Pick the lighting condition, and the node scales the R/G/B channels to make neutral what should be neutral.

This is one of those post-processing primitives that the KB keeps telling people to reach for before a diffusion pass: it's deterministic, instant, and can't invent anything. A 5500K daylight scene shot under a 3200K tungsten bulb is a math problem, not a creative one, and this node is the math.

How it works

Color temperature is a real physical quantity, and the node converts it into per-channel multipliers via the standard blackbody approximation - kelvin_to_rgb() gives you the RGB tristimulus for a given temperature, and the correction is the ratio between the target temperature's multipliers and the source's. You're telling it "the light in this shot was 3200K, I want it to look like 5500K," and it scales the channels accordingly. tint handles the green/magenta axis that pure temperature can't express (fluorescent tubes are a classic offender). Everything runs as a tensor op on the GPU when use_gpu is on.

The preset dropdown is the shortcut drawer: Daylight, Cloudy, Shade, Tungsten, Fluorescent, Flash, Candlelight, Sunrise/Sunset, Blue Hour, Moonlight - each one just fills in a temperature (and a small tint where the author thinks it belongs). Pick Custom and the temperature and tint sliders are yours.

The inputs that matter

  • preset - the fastest path. Unless you're being precise, pick the lighting condition.
  • temperature (1000–15000K) and tint (−100 to +100) - the actual controls, active when preset is Custom.
  • source_temperature (default 5500) - what the light was. This is the one people forget, and it's the whole ballgame: if your source is actually 3200K but you leave this at 5500, you're "correcting" as if the shot were daylight, which won't remove the cast. The node assumes daylight source by default, which is right for most AI output but wrong for a shot that already has a known cast baked in.
  • intensity (0–2) - how much of the correction to apply. Dial it to 0.5 for a partial correction when full neutralization looks clinical.

The single output is the corrected IMAGE, same dimensions, same batch - drop it anywhere a color-corrected image needs to go.

How to install it

It's part of the radiance pack. ComfyUI Manager → search "Radiance", or:

cd ComfyUI/custom_nodes
git clone https://github.com/fxtdstudios/radiance.git
cd radiance
pip install -r requirements_windows.txt

Restart, and it's under FXTD Studios/Radiance/Color.

Common issues

The classic trap is leaving source_temperature at the default. If you're correcting an image that was generated with a warm cast (or already graded warm), the node can't know that - set the source to what the image actually looks like and it'll neutralize properly. Second, remember temperature and tint are both relative to that source: changing the preset swaps both temperature and tint values, so if you set a preset then fine-tune, the presets overwrite your sliders when you switch back. And as with any white-balance node, it works best on footage where neutrals exist - a frame with no white or grey reference will accept whatever correction you dial in, for better or worse.

For the "everything I generate has a green tint" crowd, this is a two-click fix. Just remember the source temperature - it's the difference between fixing a cast and politely adding a new one.

CategoryFXTD STUDIOS/Radiance/Color

Inputs (13)

NameTypeDefaultDescription
imageIMAGERGB image to rebalance, scene-linear (Rec.709 primaries). Apply to linear data, not display-encoded sRGB.
modeCOMBOTemperature / TintTemperature / Tint: adapt from D65 to a Kelvin white plus a green/magenta tint. Illuminant Adapt: Bradford from src to dst illuminant. Manual RGB Gain: multiply channels.
presetCOMBOManualReplaces temperature with a preset Kelvin value. Only used in Temperature / Tint mode; Manual uses the temperature slider.
temperatureFLOAT65001667–25000Target white in Kelvin (Planckian locus), adapted from D65. Lower values warm the image, higher values cool it; 6500 is close to neutral. Temperature / Tint mode only.
tintFLOAT0.000-1–1Green channel gain of 2^(-tint/2): positive adds magenta, negative adds green, +/-1 = half a stop. Temperature / Tint mode only.
src_illuminantCOMBOD65White point the image was balanced for (CIE standard illuminant). Illuminant Adapt mode only.
dst_illuminantCOMBOD50White point to adapt to with the Bradford transform. Illuminant Adapt mode only.
gain_rFLOAT1.0000–4Linear red multiplier, 1 = unchanged. Manual RGB Gain mode only.
gain_gFLOAT1.0000–4Linear green multiplier, 1 = unchanged. Manual RGB Gain mode only.
gain_bFLOAT1.0000–4Linear blue multiplier, 1 = unchanged. Manual RGB Gain mode only.
strengthFLOAT1.000–1Linear mix between the original (0) and the corrected image (1).
grade_info_inoptSTRINGOptional grade_info JSON from an upstream node. Only recorded as "upstream" in this node's info output; it does not change the image.
ocio_contextoptRADIANCE_OCIOFrom OCIO Context. Makes sure that config is loaded (and loaded first) before this node converts.

Outputs (2)

NameTypeDescription
imageIMAGE—
grade_infoSTRING—