When an image is captured by a digital camera, the sensor response at each pixel depends on the illumination. That is, each pixel value recorded by the sensor is related to the color temperature1 of the light source. When a white object is illuminated with warm color temperature lamp, it will appear reddish in the recorded image. Similarly, it will appear bluish under a cold color temperaturelamp. The purpose of white balance (WB) is to process the image so that visually it looks the same way, regardless of source of light.
Read the full application note: