Lighten only and Darken only blend modes are chromaticity dependent editing operations
This page compares results of blending relatively saturated colors in the Lighten only and Darken only blend modes in the linear gamma ProPhotoRGB and the linear gamma unbounded sRGB color spaces. Even though the unblended colors are the same (same XYZ locations) in both color spaces, blending the colors produces very different results in the two different color spaces.
Written April 2014. Updated August 2014.
This article is part of a series of articles on the limitations of unbounded sRGB as a universal color space for image editing.
Introduction: Lighten only and Darken only blend modes are chromaticity dependent
Assuming a high enough bit depth, the unbounded sRGB color space can be used to encode and display any color. Occasionally a software developer will conclude that therefore unbounded sRGB can be used as a kind of universal color space for image editing. However, many crucially important editing operations, including the Lighten only and Darken only blend modes, are highly chromaticity-dependent, which means that the result of the operation depends on the RGB working space in which the operation is done.
Software used in this demonstration:
High bit depth GIMP 2.9 from git is somewhat unusual among RGB image editors in that it actually can be used to edit images in the unbounded sRGB color space. So I used GIMP 2.9 to prepare the illustrations given below. The default GIMP 2.9 from git uses linear gamma RGB values for some editing operations and uses "gamma corrected" RGB values for other editing operations. To avoid any accidental "apples to oranges" comparisions, I compiled and used a version of GIMP from git that I modified to ensure that all editing operations were done using linear gamma processing.
Many photographers who shoot raw choose to output and edit their images in the ProPhotoRGB color space. Some photographers, knowing the value of linear gamma image editing, choose to output and edit their images in the linear gamma ProPhotoRGB color space. So on this page I compare results when using Lighten only and Darken only blend modes in the linear gamma ProPhotoRGB color and the linear gamma unbounded sRGB color spaces. All references below to "ProPhotoRGB" and "unbounded sRGB" refer to linear gamma versions of these two RGB color spaces.
As test files I chose four relatively saturated interpolated raw files produced by my Canon 400D camera. The four test files show results of blending reds, yellows, and greens.
Lighten only blend mode: ProPhotoRGB and unbounded sRGB compared
Darken only blend mode: ProPhotoRGB and unbounded sRGB compared
For the four test images considered above:
- ProPhotoRGB results from the Lighten only and Darken only blend modes were reasonable and expected.
- Compared to colors blended in the ProPhotoRGB color space, colors blended in the unbounded sRGB color space were more desaturated and also rather unexpected. For example, in the unbounded sRGB color space, in the Lighten only blend mode, cranberry red and dark green produced orange, and in the Darken only blend the same two colors produced dark purple, obliterating detail that was visible when blending in the ProPhotoRGB color space.
In theory, unbounded sRGB image editing might sound like an appealing way to simplify the code when writing a color-managed image editor. In practice, after converting my ProPhotoRGB images (which were chosen precisely because they do have colors that fall outside the very small sRGB color gamut) to the unbounded sRGB color space, the Lighten only and Darken only blend modes produce colors that are simply unacceptable.