skip to main content

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

Depending on the color space in which the layers are blended, blending the red rose with the green leaf using the Lighten only blend mode produces visibly different results:

  • Upper left: A red rose.
  • Upper right: A green leaf.
  • Lower left: Result of blending the rose with the leaf in Lighten only in the ProPhotoRGB color space.
  • Lower right: Result of blending the rose with the leaf in Lighten only in the sRGB color space.

When blended in the ProPhotoRGB color space, the blended colors are truer to the colors in the unblended layers than they are when blended in the sRGB color space. In the sRGB color space the blended colors have lost saturation.

Depending on the color space in which the layers are blended, blending the yellow dandelion with the red flowers using the Lighten only blend mode produces visibly different results:

  • Upper left: A yellow dandelion against a green background.
  • Upper right: Some red flowers.
  • Lower left: Result of blending the dandelion with the red flowers in Lighten only mode in the ProPhotoRGB color space.
  • Lower right: Result of blending the dandelion with the red flowers in Lighten only mode in the sRGB color space.

When blended in the ProPhotoRGB color space, the blended colors are more saturated and also truer to the colors in the unblended layers, than they are when blended in the sRGB color space. In particular, in the sRGB color space the red flowers turned orange everywhere they were blended with the green background. In the ProPhotoRGB color space, the red flowers stayed red.

I don't normally edit in the sRGB color space. Rather when I finish editing an image, I convert it to sRGB if I want to display it on the web. I suppose it's possible that people who routinely work in the sRGB color space expect that bright red over dark green produces orange in Lighten only mode, but I find it surprising and disturbing.

Darken only blend mode: ProPhotoRGB and unbounded sRGB compared

Depending on the color space in which the layers are blended, blending the red rose with the green leaf using the Darken only blend mode produces visibly different results:

  • Upper left: A red rose.
  • Upper right: A green leaf.
  • Lower left: Result of blending the rose with the leaf in Darken only mode in the ProPhotoRGB color space.
  • Lower right: Result of blending the rose with the leaf in Darken only in the sRGB color space.

When blended in the ProPhotoRGB color space, the rose/leaf blend colors are brighter and also truer to the colors in the unblended layers, than they are when blended in the sRGB color space. As the artist editing the image, it surprises me to see the red rose color turn to dark magenta when blended with green in the sRGB color space.

Depending on the color space in which the layers are blended, blending the red rose with the green leaf using the Darken only blend mode produces visibly different results:

  • Upper left: A yellow dandelion against a green background.
  • Upper right: Some red flowers.
  • Lower left: Result of blending the dandelion with the red flowers in Darken only mode in the ProPhotoRGB color space.
  • Lower right: Result of blending the dandelion with the red flowers in Darken only mode in the sRGB color space.

In either color space, blending the yellow dandelion over the red flowers produces some wild-looking shapes. When blended in the ProPhotoRGB color space, the blended colors make sense: where the red from the petals shows through against the green background, the color is subdued, but still recognizably reddish. When blended in the sRGB color space, the red petals blend with the green background to produce dark purple-blue. As the artist editing the image, I find the purple-blue colors utterly unpredictable and completely baffling.

Conclusion

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.