Three ways to fix colour: Star-Based uses the detected stellar population to put the scatter on the blackbody locus (physically grounded colour); Manual dials per-channel gains by hand; Auto grey-worlds the whole frame. Mask-aware; the star-based mode also opens a diagnostic before/after plot.
Pick a mode from the White Balance Type dropdown; the relevant controls appear below. Then Apply.
σ = 100, 50, 25, 12, 8, 5, 3 in order and stops at the
first value that detects ≥ 1200 stars (§2.3). When this is on the
slider becomes a read-out of the resolved σ; uncheck to drive it
manually. The choice is remembered.Three gain spinboxes (R / G / B, range 0.5–1.5) scale each channel directly. Useful for fine-tuning after an automatic pass or dialing in a known cast.
Grey-world: each channel is scaled so its mean matches the overall mean. One button, no settings — fast and simple, but only right when the scene really averages to grey.
RGB only; all three modes blend through any active mask on the destination
document (out = src·(1−m) + out·m).
Auto is one line of maths; Manual is two. Star-Based is the interesting one — it uses the detected stars themselves as a colour reference, aligned to the Planckian locus.
Grey-world scales each channel so its mean matches the overall mean:
Manual is the same shape with user-set k_c (0.5–1.5 per
channel).
The star-based mode runs a five-step pipeline:
Rather than guessing a detection threshold for each field, the waterfall tries them in order and stops at the first that works:
Only sep.extract is retried per rung — the one-off BN pass
and SEP background estimation are computed once — so the extra cost is
modest even on large frames. If no rung reaches 1200, the lowest (most
sensitive) σ is kept so the pipeline still has something to work with. The
resolved σ is reported back and drives the slider.
In (R/B, G/B) space the stellar scatter lies on a line whose slope depends on colour balance. A linear fit gives the current slope:
With a target slope s_target = 0.55 matching the blackbody locus,
and tilt strength τ = 0.7 (so the full correction isn't forced
in one step):
Splitting the gain symmetrically between R and G keeps the overall exposure roughly constant:
The tilt is then applied to the reference star-colour median, and a neutral shift brings that tilted median to grey:
The combined gain g_c is applied at the background pivot (§2.2
step 5), so both the stellar scatter and the sky end up where they should.
Instead of three scalars, this mode solves a 3×3 matrix that maps measured
star colours to targets projected orthogonally onto the blackbody locus. The
locus is anchored at the physically correct neutral (R/B = 1, G/B ≈
0.96) — a truly neutral grey star is slightly green-deficient
relative to equal RGB:
Each star's current ratio point is projected onto that line and blended toward the target by the tilt strength:
The matrix is then solved by least-squares (per output channel), weighted so the anchor neutral is reproduced exactly. The result is clamped by a per-pixel negative-fix (shift up by the minimum channel so no pixel goes negative) and a luminance-pivoted ceiling compression — both preserve inter-channel ratios instead of hard-clipping any one channel.
The result window plots the measured star colours in R/B vs G/B space before
and after, over a Planckian locus drawn in the same ratio space (Planck
spectrum → approximate CIE 2° XYZ matching functions → linear sRGB
→ ratios), with Kelvin tick marks at 1500, 2000, 2500, 3000, 4000, 6000 and
10000 K. The blue cross at (1, 1) is the equal-RGB neutral
reference. A well-balanced broadband image should land the scatter on the locus
and the median near the reference.