# How to scale between two white balance settings for perceptually equal increments?

If I have two white balance settings (say, one for direct noon sunlight, and one for full shade) and I want to create a series of interpolated settings that span between the two, what would be the correct method to derive the red and blue channel multiplier values between the existing ones that would produce perceptually equal steps (maintaining the green channel at unity gain, as most white balancing methods seem to do)?

Interpolate the R and B numbers logarithmically. We perceive light intensity that way, not linearly. For example, the same scene taken at a sequence of decreasing f-stops with everything else held constant yields a sequence of pictures that look successively lighter, with each step feeling roughly constant. However, the actual amount of light will go in a power of 2 sequence.

To interpolate a light level from A to B, you want to find a ratio, as opposed to a increment, that gets you there in the number of steps you want. In regular linear interpolation, if you wanted to go from A to B in 4 steps, you'd add (B-A)/4 each step. In logarithmic interpolation you want to multiply by some value each step. In this example, that multiple would be (B/A)1/4, which is the fourth root of B/A. In general, the mutiply factor each step is (B/A)1/steps.

For example, if you want to go from 5 to 39 in 4 steps, then each step must be (39/5)1/4 = 1.6712. The sequence would be:

 5.000
8.356
13.964
23.337
39.000


Perform this interpolation on each of the red and blue values separately, assuming the green values are all normalized to 1 as you stated in your question.

There's a funny thing about the way we perceive white balance.

If an image is rendered using a WB value that is significantly different than the actual temperature of the light in the scene the WB can be moved a fairly large distance with very little change in our perception of the image. If the WB is set near the "tipping point" of our perception then much smaller changes in the WB can cause changes to the color in the image that we perceive as more significant.

For example, suppose we take an image under direct sunlight two or three hours after sunrise. The light will be centered around 5200 K.

If we compare the image rendered with color temperatures of 2500 K and 3500 K we will not notice much of a difference. Both images will have a very blue tint to our eyes. The 2500 K rendering will look just a little bit bluer. The same is true if we compare the image rendered with color temperatures of 8000 K and 10000 K, they'll both look almost the same shade of yellow/orange to our eyes.

But if we compare the image rendered with color temperatures of 4900 K and 5500 K we will see a more significant difference between the two to our eyes. The 4900 K version will look a little blue and the 5500 K version will look a little amber.

Interpolating the R & B numbers logarithmically as Olin Lathrop's answer explains will yield the even steps along the WB scale between the two settings. But they might not be perceptually even steps unless the point of balance is in the center of the two samples.

• Interesting point. Not important for any purposes I've had so far, but worth noting. Probably what people are describing when they talk about how the "right" WB just "clicks" when they find it. Jan 9, 2017 at 2:06

Frankly, this does not sound practical or usable, but to do it, you can take a picture with your camera of each of Daylight and Shade WB, and then in manufacturers section of the EXIF, see like:

WB_RB Levels: 1.82421875 1.5234375 1 1, which are the multipliers used for R, B, G, G.

Each pixel of course. But WB settings (daylight, shade, etc) merely tell you nominal standard values, and NOT the values actually in your scene lighting (there are many values of Shade, and Incandescent, and Flash, etc). The camera WB only offers one unthinking choice, not related to your actual scene (which is probably your problem).

What a photographer would do is to put a standard white balance card (Porta Brace, \$5 B&H, or WhiBal is good too, but more costly - either one works fine) in the same lighting with the scene (at far edge to be cropped out, or only in the first test picture). It could be white paper or envelope or T-shirt or porcelain dish or church steeple or picket fence or sign, and these are usually close, usually intended to look White, but are not KNOWN accurate, can vary a little. It just has to be in the SAME light as your scene.

Then with a standard WB tool, you just click the card in the image, and Presto, your color is perfect, no matter what it was before. The cards are perfect Neutral colors (equal RGB components, no color cast). Clicking the card with the tool says "Computer, I am sure this spot is neutral, so make it be neutral". Presto, no color cast in your image (assuming the card is placed into same light as your scene).

All other details are superfluous. You will love this method. Makes WB be easy.

• Good general white balance answer but I'm not sure it answers the question around perceptual scaling? Do the white balance multipliers scale linearly or do they follow some other function (log? Like luminance/gamma) May 18, 2015 at 17:01
• I'm no expert on the multipliers, search Google for WB multipliers. But they apply to each component of EACH pixel, which takes care of luminance. Nikon specifies it for RBGG, which is linear. May 18, 2015 at 17:27
• Yes, I understand how to white balance for an existing light source, that's how I arrived at the two settings that I want to interpolate between. It may not sound practical to you, but if I have a reason for wanting to do it, then it's a practical questioin for me. :P May 18, 2015 at 17:32
• While it exists as linear data in a raw file, the application of gain as it relates to perception is generally not linear. When I get a chance, I'll go the empirical route and try the various logs mentioned. I just figured with all the smart people around here, it might be an easy answer for somebody. May 18, 2015 at 17:36