The imaginary friends...the imaginary colors!!!

April 15, 2014  •  Leave a Comment

The imaginary colors, the power of Lab and their application in starry night photo correction.

 

Introduction

In this article I will try to explain with few words and some example the concept of imaginary color and how this could be useful when we want to improve a starry night photography.

In this context we will not make any difference between the meaning of “impossible” or “imaginary” color and will use them whenever we talk about a group of colors that cannot be called back in our mind by our day by day experience.

Some rules: our working space is 8 bit sRGB except when we will move to Lab. When I generally talk about RGB I refer to sRGB. In Lab a number between brackets indicates a negative value of the primary a or/and b.

 

The Imaginary Colors - The RGB Way

Everyone knows that in a RGB color space the color is defined by a combination of the three primaries R (Red), G (Green), B (Blue).

Every color can assume a value in the range of 0 – 255: the brightest red is R=255, G=0, B=0; the brightest green is R=0, G=255, B=0 and the brightest blue  is R=0, G=0, B=255.

Any other color can be specified from a combination of the above mentioned primaries. When the three colors are equally balanced R=G=B, no hue prevails on the others and we will speak about neutral color or gray.

Among the neutral colors, we can define the darkest one, the black = 0,0,0 and the brightest, the white = 255, 255, 255.

This color space, that embraces thousands of shades, is not able to represent some of the most brilliant colors of the nature such as: the magenta of fireworks, the yellow of the sun, the red from a powerful laser. These kind of colors cannot be reproduced by our devices but our experience tells that they exist and we can imagine them!

For imaginary colors we intend the ones that can be defined only from a mathematical point of view but cannot be observed in the real life world: let’s think about a magenta which is even brighter and more saturated then the magenta of a firework. Let’s think about a very saturated green (e.g.: an emerald green) which is in the same time very very dark.

To summarize, these colors can be defined with the following sentence: extremely saturated colors which are very bright or dark at the same time.

To define an impossible color is like trying to define in RGB a triad with the following values: 300, 300, 255!!! That is impossible. Once we reach the maximum value of luminosity 255, 255, 255 (white) no other color component can be added.

 

The Imaginary Colors - The Lab Way

In Lab, the RGB white (255, 255, 255) can be identified  by the following coordinates: L=100, a=0, b=0  that, in brief, informs us to have reached the highest luminosity (L=100) without any color component (a=b=0).

And now here is the magic: since Lab allows to define luminosity with or without specifying a color, starting from L=100, we can begin to introduce a color component more and more intense.

We are defining a kind of very bright color which at the same time begins to be saturated!

 

If, for instance, we pick a purplish magenta R=255, G=0 e B=255, the equivalent Lab coordinate is L = 68, a =94, b = (60).

Let us pay attention to luminosity: the brightest purplish magenta in RGB has got only 68 point in L!!! not even close to L=100.

From this point on, every L boost that retain the same color component of a and b will take us in a range of luminosity and color that RGB cannot copy with. The thing becomes even more extreme if  we think that we can increase the saturation pushing hard on a (+20 points) and b (-80 points).

 

Let us recap:

  • An imaginary color is a very dark or bright intense color that can be defined only from a mathematical point of view;
  • The right color space to do so is Lab since it can deal with the luminosity channel separately from the color channels;
  • In RGB, once reached the white and black, no color information can be added as Lab can do instead;
  • To make an example: the brightest purplish magenta in RGB is a color more or less in the middle of the color space Lab.

 

A Matter of Translation

Our devices work only with a color space which is a small set of Lab: Monitors work with a color space very similar to sRGB and printers with CMYK color space (e.g.: fogra 39).

Every time we work in Photoshop with the color space Lab and we bump into an impossible color, Photoshop needs to reinvent it in a way that our device can reproduce it properly.

There is only one path to follow: changing the luminosity (increasing or decreasing it) and the saturation until we enter again the device’s color space gamut.

We already know that the RGB 255,0,255 is equal to Lab 60, 94, (60).

Let’s now increase luminosity keeping the same hue: a very intense purple-magenta that becomes brighter and brighter according to the following table:

 

  1. 60, 94, (60)
  1. 80, 94, (60)
  1. 90, 94, (60)
  1. 100, 94, (60)

 

Let’s use the color picker to pick these colors (fig.0).

 

Imaginary colors - Color PickerFig. 0 Imaginary colors - Color Picker Imaginary colors: picking an imaginary color!

                                

 

Then with the help of a brush, let’s paint every single color of the table. At the end, let’s read which “real” color PS has used (fig.1).

 

Imaginary colors - gradient1Fig.1 Imaginary colors - gradient1Imaginary colors: increasing or decrasing luminosity in a very saturated color could creates an imaginary color that photoshop translates in a real color.

                                            RGB                                                                          Lab

 

Lab

Point #1

Point #2

Point #3

Point #4

Imaginary

60, 94, (60)

80, 94, (60)

90, 94, (60)

100, 94, (60)

Real

60, 94, (60)

68, 72, (48)

74, 57, (39)

80, 42, (30)

 

The imaginary color corresponding to Point #4 (highest luminosity L = 100 and same hue 94, (60)) has been translated in a real color decreasing L from 100 to 80 and the primaries a and b by half at the same time reaching the values 42 and (30) .

 

In the same way, if we imagine an impossible color with L=0 and color components equal to 94 and (60) and we begin to increase the saturation in a channel according to the table below, this is what it happens (fig.2):

 

  1. 0, 94, (60)
  1. 0, 105, (60)
  1. 0, 115, (60)
  1. 0, 127, (64)

 

Imaginary colors - gradient2Fig. 2Imaginary colors - gradient2Imaginary colors: increasing or decrasing luminosity in a very saturated color could creates an imaginary color that photoshop translates in a real color.                                            RGB                                                                          Lab

 

Lab

Point #1

Point #2

Point #3

Point #4

imaginary

0, 90, (60)

0, 105, (60)

0, 115, (60)

0, 127, (60)

real

19, 44, (29)

22, 46, (25)

24, 49, (20)

27, 52, (16)

 

The first point, which is black and purple at the same time, has been lightened increasing Luminosity from 0 to 19; the a component  is decreased by a factor of 2 (from 90 to 44) and the b ones by a factor of 4 (from (60) to (16)).

Any other attempt to boost the saturation will result in lighter color and even if the a channel increases a bit, the same we cannot say for the b that is further reduced.

 

Recap Again:

  • We have seen how to define impossible colors and how PS translates them in real colors changing luminosity and saturation;
  • We have seen this for a bright color and a dark color.

 

 

Another little bit of theory - Hold on!!!!

How can all of this be useful during the post-production of a starry night?

To improve the visibility of the stars is quite common to apply an Unsharpening Mask (USM).

The effect is to add a light halo to the stars and a dark one all around them (that can be removed by merging in lighten mode).

This technique finds its limit if applied to the brightest stars that are close to the RGB maximum value. They can easily reach it once the USM add another bit of luminosity making lose any residual color information.

To better understand the subject let’s try to emulate one of most beautiful star in the sky: Albireo, a binary system in the Cygnus constellation with an orange and a blue star (fig.2a).

 

Albireo copyright Francesco Di TofanoFig. 2a Albireo copyright Francesco Di TofanoAlbireo copyright Francesco Di Tofano

 

 

With a 25% hardness brush, let’s paint the binary system in a black background. Then let’s try an USM with the following parameters: amount 300, radius 30, threshold 0. Let’s do it first in sRGB then in Lab color space and let’s read the color in the middle of the star (fig.3).

 

Imaginary colors - USM - AlbireoFig.3 Imaginary colors - USM - AlbireoImaginary colors: Applying an USM in RGB to the stars makes them lose any color information. This does not happen in Lab

                 (the two readings refers to the blue and orange star)

 

In RGB  the stars are completely burn out except for a little halo in the border. In Lab the colors still exit thanks to the fact that there it is possible to define an imaginary color which is very bright and saturated at the same time. This color is translated in a real color by Photoshop and even if a small color shift occurs in the blue component, it is a little price to pay not to completely burn the brightest stars.

We need to remember also that the USM has been applied not only to L but also to a and b channels introducing an increase in luminosity  and saturation at the same time!!!!

Furthermore. we can observe what would happen if we blend the result in luminosity mode which is equivalent to apply the USM only to the L channel (fig.4):

 

Imaginary colors - USM - LabFig.4 Imaginary colors - USM - LabImaginary colors: Applying the USM to the three Lab channels can bring different results compered to USM applied only to L channel.

 

 

In both cases the color has been preserved with the following difference: in the first case the stars are less bright but apparently more saturated; in the second case exactly the opposite. Which method to use depends on what we want to obtain: to maximize the contrast rather than to preserve the color.

One last interesting step is to apply the USM in Lab, convert in RGB and use the lighten blending mode (on the left) then compare it to the result that we obtain remaining in Lab and applying the screen method (on the right) (fig.5):

 

Imaginary colors - Blending MethodFig.5 Imaginary colors - Blending MethodImaginary colors: different blending methods in different color spaces lead to different results.

 

 

The conclusion is that the best way to increase the luminosity of the stars, keeping their colors, is to stay in Lab, apply an USM and blend the result in screen mode.

 

From Theory to Practice

Now we need to understand how to isolate/select the stars in the sky, for example in the photography below (fig.6).

 

Imaginary Colors - starting pointFig.6 Imaginary Colors - starting pointImaginary Colors - the starting point: point 2 measures the color on a bright star trail

 

 

In this shot, the color sample #2 identify a very bright star trail (253,252,248) that we need to improve along with the others. If the photo has been shot with a wide-angle, the stars can be assimilated to small edges. For this reason we can:

  1. Move to Lab;
  2. Duplicate twice the background level;
  3. Apply the find edge filter to the top level (fig.7);

 

Imaginary Colors - find edgeFig.7 Imaginary Colors - find edgeImaginary Colors - The application of the filter find edge to a star trail

 

 

  1. Desaturate and apply a curve to lighten the sky and darken the stars (or star trail);
  2. Other useless borders can be removed by means of a white brush (fig.8);

 

Imaginary Colors - find edge maskFig. 8Imaginary Colors - find edge maskImaginary Colors - The mask obtained after the application of the filter find edge to a star trail.

 

 

At this point the stars (or star trail) will appear black in a white background.

  1. On the second layer, apply a mask;
  2. On the mask apply the inverted luminosity of the top layer (the one resulting from the find edge filter);
  3. Deselect the top layer no more useful;
  4. Select the second layer and apply a Gaussian blur of about two pixels to remove small defects;
  5. Deselect the lock that links the image with the mask;
  6. On the second layer apply USM with the following parameters: amount 300, radius 30, threshold 0;
  7. Apply the screen method and eventually reduce the opacity to keep in control the final effect (fig.9).

 

Imaginary Colors - Improving the star trailsFig.9 Imaginary Colors - Improving the star trailsImaginary Colors - the final result

 

 

The star field has been improved and the brightest stars still retain their color as can be seen with sample point #2: 255,252,228.

 

Conclusions

If we do not pay attention during color correction in RGB, we risk to reach the upper limit (255, 255, 255) with the brightest pixels losing any of their color information.

In Lab, even if we reach the maximum luminosity L=100, the color information is kept by the a and b channels.

The new color, the Lab imaginary color, will be translated by Photoshop in the most similar RGB color without burning it out.

The power of Lab in handling the impossible colors can be an help for us when we want to increase the luminosity of the stars without losing the color of the brightest ones.

 

 

Some Considerations coming from your comments

1) is it lab the only color space where it is possible to define imaginary colors? No... even Prophoto can call for imaginary colors: 0, 255,0 (green) and 0, 0, 255 (blu) are outside the visible colors in CIE 1931 xy chromaticity diagram. Even so, until now, the work flow I described works better in Lab then in prophoto (in prophoto there is always the risk to reach the limit of 255). 

2) CMYK fogra 39 is a basic sottractive color space. That does not mean that there are not other possibilities to use more inks and expand the gamut!!!

3) LAB does not include all the visible colors: fluorescent color are out of Lab's capability

4) I used an expample speaking of RGB and colors that should need a kind of coordinates such as 300,255,255 that is also impossible from a mathematical point of view. We must remember anyway that imaginary colors are "imaginary" because they can not be sensed by our eyes/brain; which is the limit that separates an imaginary color from a real one? I think it is impossible to say.

 

Do not forget that even the best shot you can do will not compete with the nature show itself!!

If you think that this Tutorial could be useful to other astronomy and astrophotography amateurs, please feel free to share it!!

Paint the Sky, Share your Knowledge!!

Ciao

Dario

 

www.dariogiannobile.com

www.dariogiannobile.com/blog

https://www.facebook.com/pages/Astrophotography-Behind-the-Scenes/501454273309416


Comments

No comments posted.
Loading...

Some of articles are also available to download in pdf format in english and/or italian language. Please have a look at the "PDF download" page.

 

Do not forget to vist the "Publications" page where you can find my work published in an astronomical magazine
 

Subscribe
RSS
Archive
January February (3) March (3) April (1) May June July August September October November December
January February March April May June July August September October November (1) December
January (1) February March April May June July August September October November (1) December
January February March April May June July August September October November December