Channel blending when converting to black and white can fail completely in the unbounded sRGB color space
Every once in a while a software developer will propose that unbounded sRGB can be used as a universal color space for image editing. This article provides an example showing how channel blending during a conversion to black and white worked perfectly in the source color space but failed completely after a conversion to the unbounded sRGB color space.
Written March 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
When working with interpolated camera raw files, normally I use a custom RGB working space that's the same size and shape as my camera input profile. As an experiment, I tried to recreate in the unbounded sRGB color space a conversion to black and white that I had previously done in my custom RGB working space.
I initially envisioned the conversion to black and white after inspecting the image channel data during raw processing. Part B below shows the steps I followed in the conversion to black and white in my custom color space. Part C shows what happened when I tried to replicate the steps in the unbounded sRGB color space.
Converting an image from a wider gamut color space to the unbounded sRGB color space necessarily rearranges channel data, and the more saturated the image, the more radically the channel data is rearranged. My envisioned conversion to black and white cannot be done in the unbounded sRGB color space.
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 "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.
Converting to black and white in a custom "camera sized" RGB working space

This is a bright orange-yellow flower, shot raw and processed with all image enhancements disabled. I saved it to disk as a raw color image, and then applied a very flat custom camera input profile that I made using ArgyllCMS. So this is as close to a scene-referred rendition as I can reasonably expect to get given the equipment I have to use. The flat rendition pictured above doesn't display very well in the sRGB color space because the intense orange color falls outside the very small sRGB color gamut.
Like many bright yellow and orange flowers, this flower's interpolated blue channel contains some nice details that are missing from the red and green channels. Unfortunately, the blue channel detail is clipped to solid black upon conversion to a standard RGB working space such as sRGB or ProPhotoRGB. Preserving the blue channel detail requires using a "camera-profile-sized" RGB working space, which I made using LCMS.
The flower's blue channel detail is interesting. So I made a black and white rendition of the flower by using the blue channel as a blending layer over a straightforward luminance-based conversion to black and white. Figure 2 shows the luminance-based conversion to black and white and also the blue channel.

The image on the left is the result of doing a straight Channel Mixer luminance conversion to black and white. The image on the right is the flower's blue channel, which I dragged over to the layer stack. The blue channel shows the presence of water droplets that aren't visible in the color image or in the luminance-based conversion to black and white (look at the petals in the upper left corner of the blue channel).

To make the black and white rendition shown above, I blended the blue channel into the luminance-based black and white conversion using "multiply" blend mode, and then worked with the resulting image to get the final tonality. When I took the picture the light was fading rapidly, so I was shooting wide open and the center of the cone isn't in focus. Even so, I like the resulting picture.
Converting to black and white in the unbounded sRGB color space
All colors can be encoded and displayed in the very small sRGB color space by using an unbounded ICC profile conversion, thus allowing otherwise out of gamut colors to be expressed using RGB values that are greater than one and/or less than zero. The yellow-orange portions of the flower shown in Figure 1 above are in fact out of gamut with respect to sRGB, having red channel values that are greater than one, and blue channel values that are less than zero.
After the image has been converted to the unbounded sRGB color space, reproducing the black and white rendition shown in Figure 3 above is impossible.
Certainly the saturated image colors are not clipped by converting from the camera input profile to an unbounded sRGB working space. And certainly the luminance-based conversion to black and white produced the same result when done in either color space.
But as shown in Figure 4 below, the flower's red, green, and blue channel information is radically altered, destroying the original blue channel detail and rendering the blue channel unuseable as a blending layer.

Figure 4 should be viewed from bottom to top. Shown side by side are the results of editing the flower image in two different color spaces. On the left are the results of editing the image in the unbounded sRGB color space . On the right are the results of editing the image in a true linear gamma, camera-sized working space.
The GIMP layers dialogs are shown at the bottom of Figure 4, followed by the five layers used to do the initial conversion to black and white:
- Layer 1: On the left, the color image has been converted from the camera input profile to GIMP's built-in sRGB working space. On the right, the color image has been converted to my linear gamma "camera profile sized" RGB working space.
The colors look alike because they are alike. The XYZ colors are the same for both images. Only the encoding is different. The image on the left is encoded in the sRGB color space, using unbounded RGB values. The image on the right is encoded in a much larger color space that doesn't require RGB values less than zero or greater than one.
- Layer 2: The color image has been converted to black and white using the GIMP/gegl mono mixer.
For the sRGB image on the left, the following sRGB Luminance values were used: Red: 22%, Green: 71%, Blue: 7%. For the camera-based working space on the right, the Luminance values were: Red: 27%, Green: 86%, Blue: -13% (a negative Y value for the blue channel is not unusual for a camera input profile). Both color spaces produced exactly the same luminance-based conversion to black and white.
- Layer 3: After making the luminance-based black and white conversion invisible, the color image's blue channel is dragged over to the layer stack.
As shown on the left, converting the flower image to unbounded sRGB results in a blue channel that looks mostly solid black. This is because the flower petal colors are out of gamut with respect to the sRGB color space. So that bright yellow orange color requires negative blue channel values (the red channel values are greater than one, but in the present case that doesn't matter as I'm not using the red channel).
As shown on the right, in the linear gamma camera-sized working space there is full detail in the blue channel.
- Layer 4: I used GIMP/gegl's auto contrast enhance to expand the blue channel's dynamic range.
I'm not sure what auto contrast enhance did to the unbounded sRGB blue channel on the left, but it looks like all the negative blue channel values were raised to be greater than or equal to zero. I also tried using the Levels lower left slider to bring all the negative RGB values to above 0.0, which produced the same result at auto contrast enhance. In any event, the resulting channel information isn't going to make a good blending layer (foregoing the auto contrast enhance step produced even worse results).
When working in the linear gamma camera-sized color space as shown on the right, auto contrast enhance produced the expected results.
- Layer 5: the blue channel layer blend mode was set to multiply and the center cone was masked to avoid making it overly dark.
As shown on the left, processing the image in the unbounded sRGB color space produced an unuseable result. The delicate petal tonality has been trashed and there are weird tonal reversals along the edges of the petals in the upper left corner. There was no point in going any further.
As shown on the right, working in the linear gamma camera-sized color space produced exactly what I wanted, which was to incorporate the blue channel detail into a "flat print" that I further processed to produce the final result shown in Figure 3.
Conclusion
Conclusion
My envisioned conversion to black and white was simple to achieve in my custom RGB working space: make a luminance-based conversion to black and white, pull over the blue channel and set it to multiply blend mode, season to taste.
Converting the image to unbounded sRGB made my envisioned conversion to black and white completely impossible.
Worse, if I hadn't examined the blue channel data before the conversion to the unbounded sRGB color space, I never would have seen the original blue channel data. As the original blue channel contained all the interesting information in this particular image, I would not have been inspired to convert the image to black and white. No doubt no loss to art! but that is not the point. The point is that a conversion to unbounded sRGB radically rearranges channel data, which in turn radically alters the information the artist has to work with.
Test files
If you would like to check for yourself and you don't have any reasonably saturated interpolated camera raw files to play with, here are the image file and ICC profiles used in this demonstration:
- The yellow cone flower in my custom linear gamma RGB working space.
- Custom linear gamma camera-sized RGB color space.
- You might also find this profile useful: Custom camera-sized RGB color space with the sRGB TRC.