Re: Retrieving impossible colour from Lab

Michael Jahn

Hi John

( i copied you directly as I am not sure if the io form scrum technology allows html embedded image in the reply - that way you should get the image in this reply )


Paragraph 3 should be of interest to you then..

The first entry in the table is the Lab Gamut. This is the set of Lab color coordinates for which there could possibly be a physical sample. These are the "real colors." Lab color coordinates that lie outside this gamut can never exist in nature, and therefore it is not important that these coordinates be represented in a working space definition. Further information about the Lab Gamut may be found here

and 3D images of it may be found 

i especially like this part

Integer Encoding of Lab

Many real world implementations of Lab encode the values as integers. Common examples include TIFF image files, ICC profiles and Adobe Photoshop images. Integers have limited ranges. Typically, the full L* range [0, 100] is encoded. However, the encoding range of the a* and b* components is usually restricted to cover the range [-128, 127]. Therefore, all possible Lab colors cannot be encoded using this scheme. Even when 16-bit values are used instead of 8-bit values, the extra bits are used to make finer divisions between values, and are not used to extend the range of values.

Here is an illustration showing the limits imposed by this integer encoding of Lab:


The semi-transparent boxes show the portion of Lab color space that may be represented by integer encoding. You can see that some real colors are excluded (the lobes that bulge outside the box). You can also see that much of the available encoding space, about two-thirds in fact, is wasted because these Lab values can never occur.  

Hope this helps.


Michael Jahn
2718 Cimmaron Ave
Simi Valley, CA 93065

805 416 6946

On Tue, Sep 8, 2020 at 5:05 AM John Phillips <paulsimonrichards@...> wrote:
Hi, I am curious about what happens to out of gamut colours during an Lab - to RGB conversion - where do they go and is there a way to keep this information? 

As I understand it, when a L*a*b image is converted to RGB, the colour values are clamped to fit into the 255 range, leaving legal representations of colours. 

I wondered if it is theoretically possible to conduct this conversion and store on file only the data which is out of gamut, without the proxy colours? 

Mr Margulis' work has inspired me for nearly 2 decades, I am an artist working on an experimental project and would like to produce files which are entirely out of gamut, with nothing visible to SRGB. Even if this means producing a blank image. 

Thank you

Join to automatically receive all group messages.