## Linear light processing for saturationTypical saturation algorithms do not perform any operations in the For sRGB devices, gamma correction is achieved by applying the sRGB transfer function to the image: To calculate luminance correctly, the values must be converted to the linear light domain by removing gamma correction (i.e. apply the opposite of the sRGB stransfer function). Linear light values, as the name suggests, have a linear relationship to light. Doubling the photons of light will double the linear light value. Gamma-corrected values do not have this property. The formula for calculating luminance (assuming sRGB primaries) is: Colormancer will apply its saturation algorithm and then multiply the resulting values by a correction factor to compensate for any shift in luminance. Many common saturation algorithms do not do this and are not designed to maintain constant luminance. Algorithms such as Photoshop's Hue/Saturation adjustment (in 8-bit RGB mode) are based on HSV color space. In HSV space, the counterpart to luminance (V) is defined as where Max is the greatest of gamma-corrected red, green, and blue. One of the flaws with this color space is that it ignores each color's contribution to luminance. Color science dictates that green contributes mostly strongly to luminance. HSV color space, by definition, will not account for two of the colors and will not weight the colors differently. A second flaw with the HSV color model is that it usually does not account for gamma correction. As a result, HSV-based algorithms can cause unintended shifts in luminance. This can increase the visibility of noise and cause some colors to appear neon, as shown in the comparison below.
Return to white papers. |
||||||||