What is white balance in photography and video?

Color temperature

In this link you have more complete information to understand what color temperature is and its relationship with human vision.

Here’s a summary summary:

Color temperature gives us an idea of ​​the dominant color in the light emitted by a given light source.

Temperature to measure color?

Yes, it may seem quite strange, but now you will see that it has its logic.

The blackbody radiation model is used to study objects that emit light .

It is a mathematical model that characterizes very well the emission of electromagnetic radiation from the sun and other objects.

In this model there is a direct relationship between the temperature of the object and the wavelength at which its emission peak is located.

The typical example is when we heat a piece of iron: first its maximum emission is in the infrared (heat) zone, we continue to increase its temperature and we begin to see it red, if we increase more it reaches red hot, orange, white, bluish …

This model with a black body characterizes very well sunlight, incandescent filament bulbs, light generated by candles, bonfires, etc.

For example, how do we model the sunlight?

  • Sun’s surface temperature: about 5700K
  • Wavelength at which its maximum emission is located: 500nm

And that of a candle?

  • Candle flame temperature: about 1800K
  • Wavelength of its emission maximum: approx. 1600nm

 

Before moving on to color temperature, let’s take a quick look at how human vision works …

Human vision

The human vision is optimized to work with the light of the sun .

Humans only see a narrow band of the electromagnetic spectrum, which spans roughly the wavelengths of 400 to 700 nanometers.

Notice that the sun has its maximum emission at 500nm, coincidence?

The color is an interpretation that makes the brain from the information sent three types of light – sensitive cells called cones, located in the retina:

  • L cones – detect wavelengths that we interpret as ‘red’
  • M cones – detect wavelengths associated with ‘green’
  • K cone – detect wavelengths associated with ‘blue’

In the image above, the shape of the Sun’s emission curve has been exaggerated to highlight where its maximum lies.

Actually between 400 and 700nm its radiation spectrum is quite flat.

Under those conditions where the three types of cones receive a balanced combination of ‘red’ photons, ‘green’ photons and ‘blue’ photons the brain interprets that we are seeing pure white light .

Note that white light does not exist physically (there are no photons of white light).

White light is a construction of the brain. A base setup, so to speak. The configuration to which vision has been adapted over millions of years of evolution.

Color temperature (now yes)

Imagine that we have a remote control that allows us to change the temperature of the sun’s surface.

If we lower the temperature, its emission peak shifts towards the long, less energetic wavelengths.

The radiation curve that the eye receives is no longer centered and balanced.

When scrolling to the right, the ‘red’ cones detect a higher level than the ‘blue’ cones

We are seeing a different light and we interpret it as more yellowish, orange light .

The same happens if we increase the temperature: it moves towards the shorter (more energetic) wavelengths and our vision would interpret a more bluish light .

 

Well, that’s the color temperature: associate a temperature with a wavelength (color)

The color temperature tells us, with a single parameter, what is the color dominant of the light that a scene receives.

Does this model work well?

Almost all light sources can be characterized more or less well with this model.

There are special cases such as fluorescent lamps, which have a discontinuous emission spectrum and can give dominance in the green zone that would not fit with the black body emission model and the color temperature.

We will see this case later.

Color temperature refers in some cases to the actual temperature of the object: combustion temperature, temperature at which a filament is incandescent, etc.

But in many other cases (most) it is not related to anything physical, it is simply a parameter to characterize the color cast of a light source.

Color temperatures of the most common light sources in photography and video:

Light, color and digital cameras

Although there are different technologies to capture color , we are going to focus on the model used by practically all cameras.

Ideally, you would have three sensors. like the human eye: one sensor for red, one for green and one for blue (some professional-grade video cameras work like this)

But that would be very expensive. Something similar can be achieved if we use a single sensor and divide it in some way so that some cells collect only red, others only green and others only blue.

This is achieved by placing an RGB filter on the sensor.

It is an optical filter that forms a matrix, a mosaic, in such a way that each sensor cell only sees a certain color.

The color filters are distributed following different patterns: Bayer, X-Trans …

Green is usually given more predominance. The greens correspond more or less to the center of the visible spectrum and give more information about the brightness of the scene.

Color channels

Well, we already have our sensor mounted with the RGB filter.

When we take a photo with these types of sensors, we are actually getting 3 different photos of lower resolution:

  • An image gives us an idea of ​​the brightness of the red tones of the scene (25% of the pixels)
  • Another image with the brightness of the green component (50% of the pixels)
  • And another image with the blue component (25% of the pixels)

 

Each of these images is called a color channel.

Therefore we have the red channel, the green channel and the blue channel.

To obtain the final image, an image in which each point (pixel) has the complete color information, we have to combine in some way the information of the three channels.

This process is known as demosaicing in English (in Spanish it would be color interpolation or chromatic interpolation), and quite complex algorithms are often used.

The ‘white’ color problem

Let’s imagine that we are in the street at noon, with a neutral white sunlight (without any color cast)

We place a perfectly homogeneous white background (neutral white) on the ground and take a photo of it with the camera in such a way that the white background fills the entire frame (and there are no shadows, etc.)

 

What should the color channels be like?

Well, all the points of the three channels should have more or less the same intensity to give rise to a light gray (depending on the exposure that we have configured)

Let’s assume that we set for an exposure that achieves 75% gray.

For each sensor cell, zero would be pure black and 100% would be pure white.

We should get 3 color channels with very similar values. All the sensor cells should give us a RAW value around 75%.

 

Does this happen in reality?

No.

In real sensors, for example, the optical filters have different performance depending on whether it is a red, green or blue filter. Also the performance of the photosensitive cell can vary with wavelength.

In general, the green channel has a higher performance, then the red and finally the blue channel usually has a lower performance.

In our example case we are going to suppose that the green channel gives us an average value of around 75%, the red one around 60% and the blue one an average value of 50%.

How is the final image then?

As the background will not appear white, it will probably appear greenish or with some color cast depending on the relationship in the sensor performance for each color.

 

How could it be solved?

Well, the solution is very simple if we have the neutral white reference:

  • We take as a reference the average level of the green channel , which is usually the one that collects more information about the brightness of the scene
  • We calculate the mean of the red channel and apply a correction factor so that it remains at the green level
  • We calculate the mean of the blue channel and apply its correction factor to equalize

And that’s what doing the white balance of the image consists of .

Once the correction factors have been determined, they are applied to all the values, to all the pixels of each channel.

In our example, when applying the white balance we will have the image we wanted with a neutral gray of 75%, without color casts.

White balance

White balance consists of applying a correction factor to the color channels (usually red and blue) to make the neutral grays in the scene appear in the image as neutral grays, without color casts .

If we always had neutral white light, the white balance would be very simple: the camera itself would have the correction factors that would be applied automatically to the channels.

The point is that we are not always going to use neutral white light, many times the scene will be illuminated by light of different color temperatures.

Color temperature and white balance

Imagine that you take an object with colors, a Rubik’s cube for example, and take pictures of it in different environments while maintaining the ‘neutral’ white balance (daylight) of the camera:

  • In the light of a candle
  • In a room with an incandescent lamp
  • Outside at dawn
  • At noon in full sun
  • In the office, illuminated by fluorescent lamps

Then we take the photos and compare them on the computer.

Yes, indeed, the colors of the cube will be slightly different when comparing photo by photo. In some cases the difference will be very noticeable.

What is the good version, the most faithful to reality?

Probably the one you did outside at noon, because we told the camera to use the white balance of sunlight (a color temperature of about 5500-5700K)

Can we correct the images to make them all have the same colors?

If we have the original color channels (for example if we have the RAW file generated by the camera) we can apply a custom white balance to get all the images to show exactly the same colors.

Especially if in the image itself we have a neutral white or gray object that serves as a reference to readjust the correction factors (in a development or editing program it is achieved by clicking)

Why is white balance important?

White balance is very important when we want to have images (or videos) with true-to-life colors, or at least with recognizable colors, that do not look unnatural.

In portraiture, for example, it is very important that the skin tone is as realistic as possible.

Human vision is very sensitive when it comes to face recognition and although color is not that important we are able to detect when a skin tone does not look natural.

For product photography (catalogs, advertising …) and fashion photography, it is essential to achieve the most faithful colors possible to reality.

The same happens when we photograph works of art, paintings , etc.

At other times the opposite may be of interest.

For example, if we are photographing in the golden hour or in the blue hour, we may be interested in preserving or even highlighting those warm tones in the objects in the scene.

Or if we want to convey a certain sensation through photography or the video scene, we can play with the dominant colors to give a sensation of warmth or coldness.

White balance on camera

If we take photos in RAW format , the white balance can be perfectly done in the development phase, once we have the photos on the computer.

If we make video or take photos in JPEG format, the white balance in editing is more limited because in the process of creating the JPEG file the camera has already made decisions for us.

For example, the camera has already done a white balance, the chromatic interpolation (demosaicing), has applied contrast, has made a tonal mapping and has made color correction.

Finally, it has used destructive compression algorithms (part of the information is lost, which is not important for the visual result, but it is important if we have to do a deeper edit afterwards)

Therefore, in these conditions it is very important that the camera knows in advance to make the correct balance.

Auto White Balance – AWB

All cameras include an automatic white balance mode (AWB – Auto White Balance)

When we configure this mode, the camera looks for the settings it considers most appropriate for the white balance from the global scene.

The automatic white balance works pretty well in most situations , especially working with natural light.

Keep in mind that the automatic white balance estimates in each photo, therefore each image may have a slightly different balance and different colors for the same scene.

Automatic white balance may fail for example when there are two or more different light sources illuminating the scene.

In lighting situations further away from neutral white light: golden hour, blue hour, artificial lighting with some color cast …

Also in scenes in which some color predominates, for example autumn landscapes in which warm tones predominate, ice landscapes in which blues predominate, objects or buildings in which there are only variants of one color …

If you shoot and save in RAW format , white balance is fine for 99.9% of situations because  it can then be adjusted in the development process  just like the camera would.

White Balance – Preset Modes

For video and photography in JPEG it is best to always do a custom white balance. Later we see how it is done.

However, there are times when we do not have time or for whatever reason we cannot do it.

In those cases we can choose a predefined white balance.

Most cameras include settings for the most common light sources:

  • Natural light (noon)
  • Flash
  • Cloudy
  • Shaded area outdoors
  • Fluorescent
  • Tungsten / incandescent

Note that each of these presets only works well in those specific situations, and only correctly covers a certain range of color temperatures.

Therefore, my recommendation is to use them only if there is no choice.

Custom white balance

Most cameras with manual controls (SLR, EVIL, compact mid and high range…) allow you to customize the white balance.

Custom white balance is the best option for video (and for photography if we use JPEG directly from camera instead of RAW)

How do you do a custom white balance?

1.- You need a neutral gray / neutral white letter
You can use a white sheet if you don’t have anything else at hand, but keep in mind that the white of the paper varies a lot between brands, qualities, etc.

2.- Place the gray card right where the main subject of the scene will be, so that it receives the same lighting

3.- In your camera, in the white balance option, choose one of the ‘Custom’ options.
There are cameras that only include a customization, others that include several customizations that we can save for similar situations, for example if you take a photo in the studio with the same type of lighting.

4.- Set the custom white balance using the neutral gray chart.
This step depends on each camera model.

Normally the camera tells you to fill in the frame with the gray card. In other models, you only have to fill a central part of the frame with gray / white.

The image does not need to be in focus.

In some models it is finished by pressing the shutter button, in others by pressing the ‘OK’ button to confirm the settings, etc. The camera usually indicates step by step what you have to do.

5.- As long as the lighting conditions of the scene do not change, you can use that custom white balance for your photos or video shots.

IMPORTANT: when you finish the session, return the white balance to automatic (AWB).
For the next session, if you forget to set the white balance at least you will have a more or less reasonable balance. But if you leave it in the custom configuration it is very likely that your next session will be useless.

Manual color temperature adjustment

Some cameras also include the option to set an exact color temperature .

This option is usually indicated by the letter K (for Kelvin)

We can indicate the temperature to the camera by moving any of the dials or the arrows on the rear crosshead (depending on the camera)

Through the screen or the electronic viewfinder we can see the effect on the scene, or we can take different images to adjust exactly the color temperature we want.

This option can be useful if we want to give a certain effect to the photograph (JPEG) or video, for example to make the scene a little warmer or cooler.

If we want to make an exact white balance, this option is perhaps more risky because taking the image on the camera screen as a reference we will not have enough information to adjust by eye and nail the balance.

There are devices called colorimeters that show the exact color temperature that the scene receives. In that case we would have an exact reference to configure that color temperature in camera.

 

How does the white balance affect the lights in the scene?

Once we set a white balance on camera:

  • All lights whose equivalent color temperature is smaller – will look warmer , yellower / orange
  • All lights whose temperature is higher: they will look colder, more bluish

 

For example, imagine we have a scene lit by:

  • Natural light through a window in the morning. Temperature approx. 5700K
  • An incandescent light bulb that illuminates the interior environment. Temperature approx. 3200K
  • The screen of a computer that lights up a person’s face. Temperature approx. 6500K

 

If we choose a temperature of 3200K in the chamber:

  • Interior items will appear in true colors and neutral grays.
  • The exterior and the area lit by the window will have a bluish cast (cold tones)
  • The person’s face will have a very bluish lighting

If we choose a temperature of 5700K in the chamber:

  • Interior objects will appear in warm, orange tones
  • The exterior and the area near the window will appear in true colors and neutral grays
  • The person’s face will have a slightly bluish lighting in the part facing the screen and slightly warm in the areas where the incandescent bulb dominates.

If we choose a temperature of 6500K in the chamber:

  • Interior items will appear very orange
  • The exterior will have a slightly warm, yellowish hue
  • The part of the face facing the screen will appear in true color, while the areas of the head illuminated by the bulb will have an orange cast

 

The same happens if we make these adjustments a posteriori in editing.

White balance with various light sources

As we have seen in the previous example, white balance can get quite complicated when we have several light sources in the scene, each one with a different color temperature.

Under those conditions, the automatic white balance will probably make an overall assessment of the scene and apply some adjustment in between.

As it is a decision that depends on the internal algorithms of the camera we cannot be sure how it will behave.

Furthermore, any small change in the frame or in the exterior lighting (a cloud that passes in front of the sun for example) can produce a significant change in colors.

For these types of situations, it is usually preferable to make a custom white balance, making the decision about what type of light is predominant or what environment we want to recreate in the scene from an artistic point of view.

If we have the option to modify one of the light sources, we can try to equalize the dominant one with respect to the other source that we cannot control. For example, if we illuminate with flash or continuous light bulbs, we can use gels (tinted sheets) to change the color temperature.

But in many cases it will be impossible to do a global white balance of the entire scene.

The point is that if we understand how light works and its properties, we are the ones who decide the white balance to achieve a certain aspect.

If we delegate that decision to the camera, the colors and balance will sometimes turn out right and sometimes go wrong.

Beware of reflected light

Even if we have a single light source (or several sources with the same characteristics), it may happen that the walls or objects located around the scene are not white and reflect light with a certain dominance.

For example, you often work with flashes bouncing the light off the ceiling to achieve soft or fill lighting. If the ceiling is painted a non-neutral color, the bounced light will include that color cast and we will surely have a difficult mix to balance.

There are many situations in which we can find this type of effect.

And in other cases we can look for them ourselves to give a special touch to the scene.

The problem with fluorescents

Some types of fluorescent lamps introduce color casts (eg in the green zone) that do not fit the black body model and cannot be characterized only by their color temperature.

It can also happen with some LED lamps, depending on their quality and the technology they use to produce the ‘white’ light.

The green cast of fluorescent tubes can only be compensated for by modifying the complementary colors of the blue-red axis, which would be those of the green-magenta axis.

For this reason (also because we can find dominant of all colors due to reflected light) the editing and development programs include both axes.

  • The White Balance axis : red – blue
  • Tint axis : green – magenta

Some cameras also include options to adjust the two axes, they are usually indicated as A axis ( Amber-Blue ) and G axis ( Green-Magenta )