White Balance Gain Calculator
Actual neutral patch inverse LINEARRGB channel gains relative independent reference, same exposure/black level corrected. Not gammaRGB, color-temperature estimation or sensor-colorimetry/white balance pipeline.
Description
Neutral-patch white-balance gains operate on linear channel values under a consistent exposure and black-level convention.
Neutral-patch white-balance gains operate on linear channel values under a consistent exposure and black-level convention.1
This tool calculates inverse RGB gains relative to a caller-chosen reference without implementing a full color pipeline.
When to use White Balance Gain Calculator
Use this tool to calculate inverse RGB gains relative to a caller-chosen reference without implementing a full color pipeline.
How to use White Balance Gain Calculator and how it works
- Prepare actualNeutralPatchLinearRgb, callerChosenNeutralReferenceValue, with the units, conventions and assumptions below.
- Enter the required fields and run White Balance Gain Calculator.
- Read result.conditionalRgbMultiplicativeGains using the output definitions below.
- Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| actualNeutralPatchLinearRgb | Exactly [R,G,B] positive linear signal measurements of the neutral patch. | array of number | Required; other constraints below |
| callerChosenNeutralReferenceValue | Caller Chosen Neutral Reference Value. Use the units and matching context stated in the calculation below. | number | Required; strictly positive; finite; other constraints below |
Require exactly three positive channel measurements in RGB order and a positive target/reference level in matching signal units. Divide the target by each channel and return gains in the same RGB order. This balances the supplied sample but does not perform illuminant estimation, clipping control or image processing.
gains=[reference/R,reference/G,reference/B] Apply the input ordering, units and branch conditions stated above.
| Output field | Meaning | Value type |
|---|---|---|
| result | Object containing the calculated or selected fields below. | object |
| result.conditionalRgbMultiplicativeGains | Three dimensionless gains in the input RGB order. | array of number |
{
"input": {
"actualNeutralPatchLinearRgb": [
1,
2,
4
],
"callerChosenNeutralReferenceValue": 2
},
"output": {
"result": {
"conditionalRgbMultiplicativeGains": [
2,
1,
0.5
]
}
}
} Limitations and assumptions
The calculation uses the supplied observations and model inputs. It does not collect measurements, select a reference population or coefficient, or establish that the model applies to the actual case. The stated branch conditions and output units remain part of the result.
All fields require explicit values. Unexpected fields, wrong types, nonfinite numbers and sparse arrays are rejected. Alignment, bounds and supported-token rules are explained above; extremely large inputs or nonfinite results can also fail. Input errors differ from successful false comparisons, unavailable-domain flags and empty match lists.
Alternative or Complementary methods
Use CRI Calculation for a complementary operation: General CRI Ra averages the first eight test-color indices after independently completed color adaptation.
Use Color Correction Filter Factor Calculator for a complementary operation: A measured filter factor compares reference and filtered signals under matched illumination and channel conditions.
References
-
White Balance Gain Calculator — tool.io
Similar or alternative tools
- CRI Calculation
General CRI Ra averages the first eight test-color indices after independently completed color adaptation.
- Color Correction Filter Factor Calculator
A measured filter factor compares reference and filtered signals under matched illumination and channel conditions.