Linear workflows are an approach to shading, lighting, and rendering that offers many advantages over working directly with non-linear video values such as sRGB. Color management enables a linear workflow by properly converting colors between the different color spaces used for input, rendering, display, and output.
Color spaces specify a color unambiguously in terms of the primary components, as well as the white point, encoding, and other attributes. For example the primary red, green, and blue values used for an sRGB image on a web page are different than those used by a P3 digital cinema projector, and the surrounding light conditions for web and cinema viewing are also different. Nevertheless, it is possible to accurately convert colors for display on either a standard monitor or a projector because both the sRGB and DCI-P3 color spaces are well characterized. However to interpret an RGB triplet like (0.5, 0.25. 0.25) properly, its intended color space must be known.
Modern renderers mimic how light transmission, absorption, reflection, and refraction work in the real world. The lights in a 3D scene should therefore closely match real lighting, whether that is outdoors or in studio, where the color values are directly proportional to the amount of light energy — this is called a scene-referred linear working space, or scene-linear for short. In such a color space, there is no maximum brightness: (1.0, 1.0, 1.0) is the color considered to be "white" by a typical observer who is fully adapted to the lighting, but light sources and specular reflections can be much brighter.
However, display devices do have a maximum brightness that is also denoted by (1.0, 1.0, 1.0), or (255, 255, 255) when expressed as an 8-bit integer value. Even on a high-dynamic-range device, this brightest value isn't nearly as bright as can occur in the real world. This makes it necessary to map the high-dynamic-range values of the scene to a more limited range for display. Simply scaling the color values down to fit the display range gives an unpleasant, "muddy"-looking image — what is needed is a tone map with a photographic response.
In addition to a high dynamic range, it's also often desirable to use a color space with a wide gamut for rendering. This makes it possible to represent more colors and is particularly important when making content for digital cinema and HDR TV, which have wider gamuts than sRGB and HDTV (Rec. 709).
For images used as inputs for textures, a transform may be needed to convert from the color space in which the images were saved into the rendering space.
As you work, the colors of the rendering space need to be converted to provide a useful preview. Normally you want an accurate preview of the final image, but sometimes you might want another view for diagnostic purposes.
For the final rendering, you might want to apply an output transform depending on how the files will be used.
The proper way to deal with an input image such as a texture depends on how the image is used in the scene. It also depends on the image itself, including its current color space, its encoding, and its image state (whether its color values are proportional to scene-referred luminance values or display-referred luminance values).
Images used for non-color data should not have any transform applied. This includes bump, normal, and displacement maps, as well as maps used for other attributes such as translucence, specularity, reflectivity, and so on.
In the first step, the scene-referred values are converted to a display-referred space. For example, this may involve a tone map to convert colors from a high dynamic range to the 0.0—1.0 range, as well a change of primaries.
The second step converts the values for a particular display. This may involve another change of primaries, the appropriate gamma, and encoding as suitable integer values.
Images are usually viewed under lighting conditions that are much dimmer than an outdoor scene or a brightly lit movie set, so tone maps are used to compress high-dynamic-range values into the display range with a photographic response that produces a pleasant image. Tone maps typically apply an S-shaped curve that boosts contrast and saturation to compensate for the lower dynamic range and dimmer viewing conditions. This curve also maps a value of 1.0 in the rendering space to a lower value in order to leave room in the display space for brighter highlights.
Simply applying gamma is not enough to fully prepare a scene-linear image for display. Without a tone map, color values that are above 1.0 remain above 1.0 and get clipped by the monitor.