Skip to main content
scotwllm
Inspiring
December 6, 2024
Question

How does Photoshop calculate Lab values?

  • December 6, 2024
  • 5 replies
  • 4442 views

In the Color Picker tool, Photoshop presents the Lab values of colors if you type in the RGB or HSB values. 

I doubt Adobe goes to one of the color conversion websites to get the Lab values. Does anybody know the formula they use to calculate it?

 

Scott

This topic has been closed for replies.

5 replies

Conrad_C
Community Expert
Community Expert
December 8, 2024

It might help to understand the quote below from the book “Real World Photoshop CS3” which was published in 2008. It also appeared in the book’s earlier editions by the late Bruce Fraser, as well as his book “Real World Color Management” published in 2003. Bruce didn’t just say that out of thin air. He worked closely with the Photoshop team.

 

 

The second quote, below, is from page 33 of “The Digital Print” (2014) by Jeff Schewe, who also works closely with the Photoshop, Camera Raw, and Lightroom teams.

 

 

Anyone who studies how Photoshop color works eventually understands that: 

  • Lab is its reference color space for color conversions.
  • Any color conversions must be corrected for the specific color space of the current color mode (such as sRGB vs Adobe RGB, or FOGRA CMYK vs US SWOP CMYK). 

 

If you show an Excel spreadsheet or color conversion table that doesn’t account for color space, or doesn’t use Lab as a reference color space, that conversion table is not useful or reliable when discussing Photoshop.

davescm
Community Expert
Community Expert
December 8, 2024

I would take that one step further:

'If you show an Excel spreadsheet or color conversion table that doesn’t account for color space, or doesn’t use Lab as a reference color space, that conversion table is not useful or reliable' when discussing Photoshop.

Dave

scotwllm
scotwllmAuthor
Inspiring
December 8, 2024

I found the answer. 

c.pfaffenbichler
Community Expert
Community Expert
December 8, 2024
quote

I found the answer. 


By @scotwllm

Does that actually honor the RGB Color Space? 

D Fosse
Community Expert
Community Expert
December 6, 2024

Stephen Marsh
Community Expert
Community Expert
December 6, 2024

Colour management.

 

Make 2 separate RGB files, one sRGB, the other ProPhoto RGB. Type in the same set of RGB values and compare the Lab readings. Type in the same Lab values and compare the RGB readings.

D Fosse
Community Expert
Community Expert
December 6, 2024

It's the other way round. All color space numbers are calculated from Lab.

 

Lab is the reference and at the base of all color management. It is one of two commonly used Profile Connection Spaces (the other is CIE XYZ).

 

A standard profile conversion goes, say, Adobe RGB > Lab > sRGB.

 

Lab numbers define a color absolutely.

scotwllm
scotwllmAuthor
Inspiring
December 8, 2024

Hi there --

 

I appreciate the time you invested to respond to my question.  However, you answered a question I didn't ask. I asked how does Photoshop calculate the numbers that appear in the color picker when a user enters RGB values. I've found formulas online that purport to do it, but they're written in code or use calculus. I took calculus around 40 years ago and have never needed to use it until now. I need to calculate the Delta-E between multiple colors, and plugging them into a website form one by one takes too much time. I'm too old to waste it on that kind of stuff, know what I mean?

D Fosse
Community Expert
Community Expert
December 8, 2024

We did answer it. The answer is color management. The Lab numbers are always there as the definition of the RGB numbers in the given RGB color space.

 

The online calculators are rubbish because they usually don't even consider color management, color spaces and icc profiles. RGB what? There is no such thing as "RGB". Numbers are undefined until associated with a specific color space.

 

Look at the screenshot I posted below. That's how given Lab numbers are represented in different color spaces.