
In
photography
Photography is the visual arts, art, application, and practice of creating images by recording light, either electronically by means of an image sensor, or chemically by means of a light-sensitive material such as photographic film. It is empl ...
and
image processing
An image or picture is a visual representation. An image can be two-dimensional, such as a drawing, painting, or photograph, or three-dimensional, such as a carving or sculpture. Images may be displayed through other media, including a pr ...
, color balance is the global adjustment of the intensities of the colors (typically red, green, and blue
primary colors
Primary colors are colorants or colored lights that can be mixed in varying amounts to produce a gamut of colors. This is the essential method used to create the perception of a broad range of colors in, e.g., electronic displays, color printin ...
). An important goal of this adjustment is to render specific colors – particularly neutral colors like white or grey – correctly. Hence, the general method is sometimes called gray balance, neutral balance, or white balance. Color balance changes the overall mixture of colors in an image and is used for
color correction
Color correction is a process used in stage lighting, photography, television, cinematography, and other disciplines, which uses color gels, or filters, to alter the overall color of the light. Typically the light color is measured on a scale k ...
. Generalized versions of color balance are used to correct colors other than neutrals or to deliberately change them for effect. White balance is one of the most common kinds of balancing, and is when colors are adjusted to make a white object (such as a piece of paper or a wall) appear white and not a shade of any other colour.
Image data acquired by sensors – either
film
A film, also known as a movie or motion picture, is a work of visual art that simulates experiences and otherwise communicates ideas, stories, perceptions, emotions, or atmosphere through the use of moving images that are generally, sinc ...
or electronic
image sensor An image sensor or imager is a sensor that detects and conveys information used to form an image. It does so by converting the variable attenuation of light waves (as they refraction, pass through or reflection (physics), reflect off objects) into s ...
s – must be transformed from the acquired values to new values that are appropriate for color reproduction or display. Several aspects of the acquisition and display process make such color correction essential – including that the acquisition sensors do not match the sensors in the human eye, that the properties of the display medium must be accounted for, and that the ambient viewing conditions of the acquisition differ from the display viewing conditions.
The color balance operations in popular
image editing
Image editing encompasses the processes of altering images, whether they are Digital photography, digital photographs, traditional Photographic processing, photo-chemical photographs, or illustrations. Traditional analog image editing is known ...
applications usually operate directly on the red, green, and blue channel
pixel
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a Raster graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
values, without respect to any color sensing or reproduction model. In film photography, color balance is typically achieved by using
color correction filters over the lights or on the camera lens.
Generalized color balance

Sometimes the adjustment to keep neutrals neutral is called ''white balance'', and the phrase ''color balance'' refers to the adjustment that in addition makes other colors in a displayed image appear to have the same general appearance as the colors in an original scene. It is particularly important that neutral (gray, neutral, white) colors in a scene appear neutral in the reproduction.
Psychological color balance
Humans relate to
flesh tones more critically than other colors. Trees, grass and sky can all be off without concern, but if human flesh tones are 'off' then the human subject can look sick or dead. To address this critical color balance issue, the tri-color primaries themselves are formulated to ''not'' balance as a true neutral color. The purpose of this color primary imbalance is to more faithfully reproduce the flesh tones through the entire brightness range.
Illuminant estimation and adaptation

Most digital cameras have means to select color correction based on the type of scene lighting, using either manual lighting selection, automatic white balance, or custom white balance. The algorithms for these processes perform generalized
chromatic adaptation
Chromatic adaptation is the human visual system’s ability to adjust to changes in illumination in order to preserve the appearance of object colors. It is responsible for the stable appearance of object colors despite the wide variation of light ...
.
Many methods exist for color balancing. Setting a button on a camera is a way for the user to indicate to the processor the nature of the scene lighting. Another option on some cameras is a button which one may press when the camera is pointed at a
gray card
A gray card is a middle gray reference, typically used together with a reflective light meter, as a way to produce consistent image exposure and/or color in video production, film, and photography.
A gray card is a flat object of a neutral-gr ...
or other neutral colored object. This captures an image of the ambient light, which enables a digital camera to set the correct color balance for that light.
There is a large literature on how one might estimate the ambient lighting from the camera data and then use this information to transform the image data. A variety of algorithms have been proposed, and the quality of these has been debated. A few examples and examination of the references therein will lead the reader to many others. Examples are
Retinex, an
artificial neural network
In machine learning, a neural network (also artificial neural network or neural net, abbreviated ANN or NN) is a computational model inspired by the structure and functions of biological neural networks.
A neural network consists of connected ...
[Brian Funt, Vlad Cardei, and Kobus Barnard,]
Learning color constancy
, in ''Proceedings of the Fourth IS&T/SID Color Imaging Conference'', pp. 58–60 (1996). or a
Bayesian method.
Chromatic colors
Color balancing an image affects not only the neutrals, but other colors as well. An image that is not color balanced is said to have a
color cast, as everything in the image appears to have been shifted towards one color.
[John A C Yule, ''Principles of Color Reproduction.'' New York: Wiley, 1967.] Color balancing may be thought in terms of removing this color cast.
Color balance is also related to
color constancy
Color constancy is an example of subjective constancy and a feature of the human color perception system which ensures that the perceived color of objects remains relatively constant under varying illumination conditions. A green apple ...
. Algorithms and techniques used to attain color constancy are frequently used for color balancing, as well. Color constancy is, in turn, related to
chromatic adaptation
Chromatic adaptation is the human visual system’s ability to adjust to changes in illumination in order to preserve the appearance of object colors. It is responsible for the stable appearance of object colors despite the wide variation of light ...
. Conceptually, color balancing consists of two steps: first, determining the
illuminant under which an image was captured; and second, scaling the components (e.g., R, G, and B) of the image or otherwise transforming the components so they conform to the viewing illuminant.
Viggiano found that white balancing in the camera's native
RGB color model
The RGB color model is an additive color, additive color model in which the red, green, and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials ...
tended to produce less color inconstancy (i.e., less distortion of the colors) than in monitor RGB for over 4000 hypothetical sets of camera sensitivities.
This difference typically amounted to a factor of more than two in favor of camera RGB. This means that it is advantageous to get color balance right at the time an image is captured, rather than edit later on a monitor. If one must color balance later, balancing the
raw image data will tend to produce less distortion of chromatic colors than balancing in monitor RGB.
Mathematics of color balance
Color balancing is sometimes performed on a three-component image (e.g.,
RGB
The RGB color model is an additive color model in which the red, green, and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three ...
) using a 3x3
matrix
Matrix (: matrices or matrixes) or MATRIX may refer to:
Science and mathematics
* Matrix (mathematics), a rectangular array of numbers, symbols or expressions
* Matrix (logic), part of a formula in prenex normal form
* Matrix (biology), the m ...
. This type of transformation is appropriate if the image was captured using the wrong white balance setting on a digital camera, or through a color filter. Changing the color balance of an image can improve classifier results on a trained ML model.
Scaling monitor R, G, and B
In principle, one wants to scale all relative luminances in an image so that objects which are believed to be
neutral appear so. If, say, a surface with
was believed to be a white object, and if 255 is the count which corresponds to white, one could multiply all
red values by 255/240. Doing analogously for
green
Green is the color between cyan and yellow on the visible spectrum. It is evoked by light which has a dominant wavelength of roughly 495570 nm. In subtractive color systems, used in painting and color printing, it is created by a com ...
and
blue
Blue is one of the three primary colours in the RYB color model, RYB colour model (traditional colour theory), as well as in the RGB color model, RGB (additive) colour model. It lies between Violet (color), violet and cyan on the optical spe ...
would result, at least in theory, in a color balanced image. In this type of transformation the 3x3 matrix is a
diagonal matrix
In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero; the term usually refers to square matrices. Elements of the main diagonal can either be zero or nonzero. An example of a 2×2 diagon ...
.
: