Showing posts with label prophotoRGB. Show all posts
Showing posts with label prophotoRGB. Show all posts

Sunday, June 8, 2008

sRGB tone curve and the Lightroom color space

I got to thinking about the display of color values and the histogram in Lightroom. Lightroom internally uses a working space with prophotoRGB primaries but with linear gamma. Using linear gamma avoids all kinds of possible artefacts and is a good choice if you have the bitprecision. On the display of RGB values in percentages and the histogram, to avoid all values to be in the 0-1% range, Lightroom modifies the values with a sRGB tone curve. I was curious to see what this really means. In this original proposal by the group from HP and Microsoft that originally designed sRGB this is explained more or less. sRGB does not have a simple 2.2 gamma that you can use but a complex curve that has a knee in the shadows. The equations are as follows:

If you have a linear R,G, or B value in sRGB primaries, the equation to find the value in nonlinear sRGB space are:

if R ≤ 0.00304,
Rnl = 12.92* R

if R>0.00304,
Rnl = 1.055* R1/2.4-0.055

repeated for Green and Blue of course.
So, save for the multiplication with 100 to get percentages, Lightroom uses this exact math to calculate the percentage values in linear prophotoRGB to the sRGB tonecurve modified prophotoRGB value display space (I'll call that the Lightroom Value Space or LVS). This tonecurve looks like the following on a double-log plot.



In Red the sRGB tonecurve and in Blue the curve for a simple 2.2 gamma. You can see that for values below 0.05 in the linear space, the deviation from a 2.2 gamma is larger than 5%. Conversely, in the non-linear LVS space, values below 10% are significantly different from when you would assume a 2.2 gamma. This means that the values I published before for the values for the MacBeth colorchecker color patches in the LVS system are all wrong. Here are the correct values:



Sorry for the graphic, I still haven't figured out how to make tables appear correctly in blogger. You can clearly see that the values are significantly different. Hope this is useful for somebody!

Friday, November 2, 2007

Relevant example for ppRGB vs adobeRGB

I realized after the last post that I need to give a real world example. The example that I am going to give is from the recent shot below:

.

I took this into Photoshop in 16-bit ppRGB and softproofed it to the profile of my local costco's Noritsu and to adobeRGB. In both cases, I show the gamut warning (in grey).

Here is the soft proof for adobeRGB (click for large version):


As you can see a lot is out of gamut in the mountain area that is lit by the rising sun. Especially the green of the trees is far out.

Now take a look at the same for the local costcos:


Far less is out of gamut. Especially the green/yellow of the lit trees is not at all out of gamut, while it was in adobeRGB. This clearly shows that in real world images, you lose colors that even not so wide gamut machines can print if you use adobeRGB as a working space. Of course, there are not really any displays that can actually display these colors...

Why use prophotoRGB instead of adobeRGB as a working color space?

Lightroom uses a variant of prophotoRGB as its internal colorspace and when you export to photoshop, it defaults to prophotoRGB. One could argue that this is overkill and adobeRGB should be wide enough. However, typical DSLRs can easily capture color outside of adobeRGB. "What does that matter if you cannot print those colors?", you might ask. The answer is that as soon as your printer has more inks than just CMYK, you can reproduce colors outside of adobeRGB! This can be easily shown when comparing profiles in Apple's excellent and free colorsync utility app. Even worse, you do not need a good printer to reproduce these colors, if you send your images to Costco's, Adorama, smugmug, and such for printing, you could be using their profiles for conversion and you would be able to reproduce color outside of adobeRGB. Don't believe me, here is the proof:



The wireframe in this graph is adobeRGB, the solid, colored volume is the glossy profile from my local costcos. As you can see the costco profile indicates that their Noritsu in this case can generate color outside of adobeRGB! Now compare this with the same figure for prophotoRGB:



As you see the entire range of colors that costcos printers can reproduce is enclosed.
Of course if you are working in less than 16 bits (everything in LR is 16 bit, so that is not anything to worry about), ppRGB might not be a good choice as you blow up the difference between 2 color values too much and you might get posterization. Fortunately, basically everything in Photoshop is 16 bits nowadays. So for prints from costco, a good workflow is to export to 16-bit ppRGB tiffs/psds, convert to the right profile in photoshop and then convert to 8-bit and save as a jpeg.