Tips & Tricks / Dealing with LRGB Color Shifts
Dealing With LRGB Color Shifts

I often get asked the question, "why do I get too bright a shot, and some salmon pink colors when I do an LRGB combine in Photoshop?".  Here is that answer, as well as what you can do about it:

When you combine a Luminance frame into a color RGB data set, you will pass through Lab color space.  A direct method is to simply convert the RGB data that has been scaled up in size to Lab color space, then replace the "L" channel with a new highly detailed deep frame.  Alternately you can paste the new Luminance frame right over the RGB data, and combine in layers with a "Luminance" blend mode.  Or the third way is to paste the RGB image over the new Luminance frame, and combine in layers using Color.  They all come out the same because Photoshop does the mathematics internally using the Lab color space.  In Lab mathematics, it can be shown that the three channels are not completely separate.  The "a" channel is tied loosely with the L channel, but the "b" channel is not significantly connected.  The result is that if you attempt to modify the L channel only, you will still change the "a & b" channels proportionately.  Now the "a" channel controls the reds and oranges, and the "b" channel the greens and blues.  Since the "b" channel is not significantly altered, it does not change hue as the brightness of the L channel goes up. The "a" channel is a different story!  As you increase the brightness of the L channel, the "a" channel shifts its hue.  The result is that reds become more orange resulting in the infamous "salmon pink" coloration, while blues stay pretty much the same.

Unlike the hue shift which plagues only the "a" channel, as the Luminosity in the "L" channel increases, both the "a" and "b" channels will lose their saturation.  Because this is a non linear function, it is quite complex to predict a correction factor.  Just turning up the saturation in a standard image processing software will only do a partial job.  You can visualize the loss in saturation as the whites start replacing the colors at high
brightness.  The brighter the L channel gets, the greater the loss of color saturation and contrasts.  Many imagers try to compensate the salmon pink shift in hue by simply turning up the saturation.

A much better method to handle this is to implement a "saturation" curves adjustment layer.  Do a normal curves adjustment layer, with the mid-point raised, and then change the blend mode from "normal" to "saturation" on that curves layer.  It more properly emulates the gamma curve saturation boost required.  This is not your typical saturation boost!  The curve boosts saturation based on the existing amount of saturation, so areas with low saturation such as dim nebulosity, and the bright core area will be enhanced the most.  This takes care of the change in saturation with increasing luminance which is non linear.

(Many thanks for much of the the above explanation from Schurs astrophotography.) 

Other approaches include:
 - Paste in a copy of the color layer, with the blend mode set to "Hue"
 - Paste in a copy of the color layer in "soft light" blend mode

Here is a bit on the source LRGB Mathematics, by John O'Farrell:
Many amateur astrophotographers have experienced color shifts in red nebula when using the LRGB method of enhancing their images.  An RGB image is made and converted into Lab color space.  The L channel is removed and replaced with enhanced data.  The color of the resulting image doesn't match the original RGB data.  Why is this?  The answer lies in the details of the RGB-to-Lab transformation.  Since there are many flavors RGB color space, we will use Adobe RGB (1998) color space for our discussion.  An RGB color space is defined in terms of red, green, and blue color space primaries plus reference white and black points.

These five quantities are defined by X, Y, and Z coordinates in CIE 1931 color space.  The process for converting RGB to Lab starts with aconversion of RGB to CIE 1931 XYZ.  The XYZ color coordinates are then converted to Lab.  If one uses the information in "Adobe RGB (1998) Color Image Encoding" document an expression for L in terms of RGB can be calculated.  For the remainder of this discussion we will assume that RGB is in the form of 24-bit color with R, G, and B being represented by 8-bit values.  If we make a simplifying assumption that the reference black point is X=Y=Z=0 then L as a function of RGB is as follows:

L = 116 [ 0.29734 R' + 0.62736 G' + 0.07529 B']^(1/3)- 16
where R' = (R / 255)^(1/gamma), G' = (G/255) ^ (1/gamma), B' = (B/255) ^(1/gamma), and gamma= 2.19921875. 

The value of L can range between 1 and 100.  Only for R=G=B=255 is L equal to 100.  So a saturated pixel in an L channel is white no matter what was in the original RGB.  Consider a pixel in an RGB image that is pure red (R=255, G=0, and B=0), conversion to Lab gives an L of 61.  Thus any pure red pixel in the original RGB image that has its L value replaced by a number greater than 61 has to change color.  So why doesn't the color just shift toward the white?  Why do images end up with a "salmon pink" color?  There is no simple
explanation.  Salmon pink is essentially pink with a little extra green added.  Where does the extra green come from?  One can see from the equation for L as a function of R, G, and B that L has the greatest dependence on G.  It seems reasonable that G will be most affected by changes in L.  All of this can be verified by setting up a spreadsheet that converts RGB to Lab and back again.  The information needed to convert Adobe RGB (1998) to XYZ can be found at Adobe's website. The formulae for converting XYZ to Lab can
be found at www.brucelindbloom.com.