Talk:Lab color space

From Wikipedia, the free encyclopedia

This article is supported by the Color WikiProject.

This project provides a central approach to Color-related subjects on Wikipedia.
Please participate by editing the article, and help us assess and improve articles to good and 1.0 standards, or visit the wikiproject page for more details.

Start This article has been rated as start-Class on the quality scale.
Mid This article has been rated as mid-importance on the importance scale.

Article Grading:
The article has been rated for quality and/or importance but has no comments yet. If appropriate, please review the article and then leave comments here to identify the strengths and weaknesses of the article and what work it will need.

This page needs to be moved to Lab color model. --Gutza 13:42, 5 Mar 2004 (UTC)

Changed my mind. I'll just make a link. :) --Gutza 16:00, 5 Mar 2004 (UTC)

The conversions might not be accurate, instead of superscripts ("power of") there is sometimes just a factor. Someone who knows this stuff should double-check the correctness. A friend of mine working in the field just helped me get the correct potency operators in. The formulas could be correct now :-) --Mcornils 23:05, 15 Oct 2004 (UTC)

Contents

[edit] CIE Lab definitions changed?

The description of CIE 15:2004 Colorimetry, 3rd Edition http://www.cie.co.at/publ/abst/15-2004.html stated that there are even changes to the equations defining the parameters of the CIELAB colour space! What changes were those, and are the CIE 1976 equations now out of date? --Nantonos 17:06, 20 February 2007 (UTC)

[edit] pictures

The pictures could use numbers along each axis.

The pictures could have some sort of outline around the area which is accurate for sRGB displays. The rest probably should have markings over it to indicate that it is pretty much junk. Also draw the line showing monochromatic colors.

It would be good to choose intensity levels that show off some corners of the sRGB space, particularly the yellow and blue corners. Maybe also do an intensity level at a linear 50% grey.

AlbertCahalan 03:14, 26 Jun 2005 (UTC)

Broken images and links on this page: http://en.wikipedia.org/wiki/Lab_color_space

One is: http://upload.wikimedia.org/wikipedia/en/thumb/9/99/Lab_color_at_luminance_25%25.png/180px-Lab_color_at_luminance_25%25.png

Two is: http://upload.wikimedia.org/wikipedia/en/thumb/0/04/Lab_color_at_luminance_75%25.png/180px-Lab_color_at_luminance_75%25.png

[edit] Wondering

I'm wondering--are images made with this color system unaffected by differences in gamma correction or otherwise screen profiles?

--Michiel Sikma 2 July 2005 17:01 (UTC)

Well, the image isn't affected by what you do to your system. Its color values continue to represent the same color. Of course, if you no longer have an accurate color mapping for your monitor, it won't look the same... Notinasnaid 2 July 2005 17:44 (UTC)

In other words: the RGB values sent to your display to represent the LAB values must change if you change the profile of your display. In yet other words: To display the LAB values, software has to convert from LAB to the colorspace of your display. Changing that colorspace changes the values. Now, with perfect displays and a lot of precision, this should not be visually noticeable, because if the profile accurately describes the display, then the resulting visual impression would be the same. But there are no perfect displays, and most of them still use 8 bits/channel - so quantization effects may cause small visual differences.


hi ,
I was wondering if some body can post information on what is the formula for evalaluating normalized color distance (NCD) between two images?
Thank you,

Hari prasad 07:36, 27 December 2005 (UTC)

I believe NCD=\sqrt{a^2+b^2} See also MacAdam Ellipse.

[edit] What is data range of a* and b* ?

The article states that L ranges from 0 to 100. However, there is no mention of the data ranges for a* and b*. Perhaps this is undefined, but if this true, then this fact should at least be discussed

This is a good point, and it needs to be fixed. The assumption is that no stimulus exceeds the white point. In other words, if [1,1,1] is the white point, then X, Y, and Z of any stimulus are all less than or equal to one. For L*, you can see that its maximum is at Y=1, in which case f(Y)=1 and L=116-16=100. The minimum is at Y=0 and L=116*(16/116)-16=0. If you do that to a* you get a maximum at 500*(1-16/116) and a minimum at 500*(16/116-1). Same idea for b*. This should be checked first, I will see if I can find a reference. PAR 04:37, 24 January 2006 (UTC)


a* and b* measured values are only bounded by the realizeable colors with highest saturation: monochromatic sources (the XYZ values along the spectral locus). But in theory a* and b* are unbounded, and many color transformations can result in values that represent colors that cannot be produced in reality (or at least that humans can't see). Later calculations usually bring those values back to reality.

[edit] Hunter Lab

The article seems to have been rewritten to emphasise that Lab means a space I hadn't heard of before called "Hunter Lab". I can't agree that this should be stated as unambigiously the case. In particular, people will encounter "Lab" in image editing and other software and it is likely to mean "CIELab". Even if some standards body has agreed that "Lab" must mean "Hunter lab", the article must deal with popular usage even if it notes that it is not recognised in scientific circles.

I am also forced to conclude that while Hunter Lab might have come first it is not nearly so well known. It is not mentioned in Hunt's Reproduction of Colour, for example.

So to start with I am removing this:

Without further qualification, "Lab" color space refers to that of Hunter (Richard S Hunter, JOSA, 38, p 661 (1948)), which is an Adams Chromatic Valance Space. It is not proper to refer to CIELAB as simply "Lab," not just because it is not an Adams Chromatic Valance Space, but also because it is ambiguous and confusing.

I will also rearrange the article to introduce both, then present CIELab first. It would be welcome to include specific references and discussions of "Lab" as a contraction, and what the writer of that reference considers correct, but it isn't up to Wikipedia to tell everyone with Photoshop that they are, unqualified, wrong. Notinasnaid 08:00, 21 June 2006 (UTC) I've done the rebalancing, and added more introductory material. I have to say, I've reread the piece I removed several times, and I still can't understand what is meant by "It is not proper to refer to CIELAB as simply "Lab" ," ... because it is not an Adams Chromatic Valance Space..." " Why not? What bearing does this have on an abbreviation? Looking forward to learning...! Notinasnaid 09:13, 21 June 2006 (UTC)

I've also added a section "Which Lab?" which guides the reader in understanding how to interpret "Lab" in particular cases. There are no cases where Lab means "Hunter lab". This is not deliberate exclusion: I just don't know of any. If after a while none are found, I think the article will have to be rewritten to more strongly associate Lab with CIELab. Notinasnaid 09:16, 21 June 2006 (UTC)

[edit] Opponent process

This color space seems strongly related to Opponent process. CIELAB primaries seem to be the same as the opponent colors in Opponent process color theory. Shouldn't both articles mention each other somehow?

  • Sorry to say, I don't see anything indicating that they have the same primaries. I'm not sure CIELAB can even be said to have three primaries since L is a luminance channel. Do you have a source for this? Notinasnaid 17:15, 24 September 2006 (UTC)
    • What I meant to say is that CIELAB is based on the same principle as the opponent process theory: the eye converts tristimulus values into brightness and two color difference channels, which is what CIELAB also does. Also, while the color difference channels may not be exactly the same colorimetrically, they are very similar: red-green and yellow-blue.
    Opponent Recording of Tristimulus Outputs
    Opponent Process Color Wheel
    CIELAB Color Wheel
    Also, here's a quote: "CIELAB can justifiably be called an opponent color space, because its chromatic dimensions are defined as the contrast between specific opposing hues, analogous of the opponent processes hypothesized by Hering. In fact, the X–Y and Y–Z contrast dimensions have a very similar shape and peak wavelengths to the Hurvich and Jameson opponent functions." [1]

[edit] LAB question

Hey, I realize that this is not exactly the forum for this question, but I am looking for a relatively obscure answer that no one has been able to help me with so far. I'm trying to make stimulus for a psych experiment using CIE space, so I made it in photoshop with LAB color, a CIE space, but I can't save it as anything but a Tiff which most other applications won't load. I can save it as an 8-bit LAB color tiff, which will sort-of load, or a 16-bit RGB color .PNG file, which will load. The problem is that the two look very different, and I dont know which is closer to the true 16-bit LAB color. Any ideas? thanks and sorry for posting a somewhat irrelevant question here.

If you are viewing on a color calibrated monitor, and have a correct RGB profile for the monitor, then converting to RGB should not change the color. If you save with an embedded sRGB profile, and view on a calibrated monitor, the colour should be in some sense "close" to what is expected. If you don't have calibrated monitors, it isn't even worth starting. Notinasnaid 08:16, 19 October 2006 (UTC)
thank you very much, I'll look into calibration for RGB monitors

Also, most applications aren't color managed at all. Even if you have calibrated your display, they may assume sRGB, or may just throw up totally uncalibrated values (having found formulae they didn't understand on some random website and used them as-is.).

[edit] Lab demo images are just not correct!

The color images shown in the article, and described as CIELAB constant luminance, are obviously not of a constant luminance! Do a simple visual inspection, or pull out any color meter you have, and compare the L* value of the dark green (top center) to the L* value of the light blue (bottom left) of any of the example pictures. You will see a huge variance.

Just imagine seeing the image in grayscale. If the L* in one of the images was actually constant (eg. 25%), and if you showed that image on black and white TV, the grey level would be approximately constant across the a*-b* dimensions. As it is now, you would see quite different grays.

Thanks for looking into this. 72.132.235.222 06:28, 24 October 2006 (UTC)John

There is a strong argument against any visual representation that doesn't claim to depict sRGB. The process of converting Lab to sRGB, and then to your perhaps (or perhaps not) calibrated monitor may not preserve luminance. Unfortunately, the graphic does not include the technical details of how it was made so that we could check up on it. Nevertheless, we can do some rough tests. Opening in Photoshop 7, using the embedded profile, and converting to L*a*b* shows a wide variation in color. It may well be worthwhile regenerating the graphics. If you do, please include full details of the software used, color settings, profiles etc. – effectively allowing the experiment to be reproduced and the results checked. Notinasnaid 07:25, 24 October 2006 (UTC)

I suspect the problem is that (sRGB) gamma has not been taken into account in the preparation of the images, but I'm not in a position to calculate them myself at the moment. As a quick check you could try applying a gamma of 2.2 using an image-editing program then see if the resulting luminance is more uniform (though of course you might see banding artifacts). 57.66.65.38 18:07, 16 November 2006 (UTC)Andrew http://www.techmind.org/colour/


The other problem is that some of the values toward the edges represent colors that are not realizeable in nature, and not visible to humans. Those values get clipped or gamut mapped into the visible colors by whatever process converted the L*a*b* values to RGB. Even in Photoshop, you can't create a map like that and get perfect luminance uniformity (try it in their color picker by clicking on the L radio button).

[edit] Origin of the square (or cubic) root

In the second paragraph, the articel states: "However, CIELAB is calculated using cube roots, and Hunter Lab is calculated using square roots." There is no explanation, however, as to the origin of these square of cubic roots. In other words, how did one came to a conclusion that Lightness is percived as (Y / Yn)1 / k, k=2 or 3 ? Nor there is an explanation as to why CIE chose to take square-root, instead of Hunter's (earlier) cubic-root.

Unfortunately, I don't know the answers to these questions, but I'll be glad if this info will make its way into the main article.


Hunt's book "The Reproduction of Colour" and Wyszecki and Stiles "Color Science" go into some of the history. It has a lot to do with the assumptions of surrounding light, adaptation, and how they matched various test data.

[edit] CIE 1976 (L*a*b*) conversion

Could someone help providing the CIE 1976 (L*a*b*) self-luminous and surface color specs for 620nm Red?

You can easily convert the 620nm into XYZ. Add a white point definition, then you can convert to RGB, CMYK, L*a*b*, etc.

[edit] Question regarding the CIE 1976 (L*a*b*) color scale

I was wondering how this system is able to treat value (lightness to darkness) as an equal partner in the determination of a specific color with the actual colors in the system (magenta/green and blue/yellow). Accorind to the Munsell color wheel, which is in the form of a cylinder, with the circumference of the cylinder being the hue, the radius being the chroma and the height of the cylinder being the value, lightness to darkness (i.e. value) is independant of the color (hue) or saturation of color (chroma), and thus, one can travel a distance of "x" (x being the radius of the cylinder) from the vertical axis at any height on the cylinder (i.e. at any value, one can have a saturation (chroma) level of "x". However, on the CIE color scale, the farther away from the equator (i.e., closer to the N + S poles of the 3D sphere), the distance one may travel from the vertical axis decreases at the lines of longitude head towards the poles. In other words, horizontal sections of the sphere, let's say, taken at 25% lightness, 50% lightness and 75% lightness don't give congruent circles. This is because, unlike Munsell's color wheel, value (lghtness vs. darkness) is treated just like any other color (i.e. green or blue) and not as an independant entity known as value. If anyone can please respond to this concern, please email me at shatnes551@yahoo.com, or my Wikipedia name is User:DRosenbach.


L* is as independent as they could make at the time. It is pretty well independent of a* and b* changes for all visible colors (outside the visible colors, who knows?). The small differences lead to improved color difference formula that warped the L*a*b* space a bit: DeltaE94, CMC, CIEDE2000, etc.

More recent work has gotten better colorspaces with more independence and better matches to human vision: CIECAM97s and it's successor CIECAM02. There were many other attempts along the way: RLab, LLab, etc. You can find historical details in Hunt's "Reproduction of Colour". However, to get the better match, these colorspaces/models require more information about the illumination, surrounding colors, etc.

[edit] Is Lab really intuitive?

The article claims: Since the Lab model is a three dimensional model, it can only be represented properly in a three dimensional space. A useful feature of the model however is that the first parameter is extremely intuitive: changing its value is like changing the brightness setting in a TV set. Therefore only a few representations of some horizontal "slices" in the model are enough to conceptually visualize the whole gamut, assuming that the luminance would be represented on the vertical axis.

However, changing the L* value is *NOT* the same as changing the brightness setting in a TV set. Lab is a luminance-chrominance color space, as opposed to a luminance-chromaticity color space. There's a subtle and perhaps unintuitive difference between chrominance and luminance. In a luminance-chrominance color space, the following would happen: Suppose you had a camera, and you put a neutral density (light blocking) filter in front the camera. Suppose the luminance is halved. In a luminance-chrominance color space like Lab, the chrominance will be halved. In a luminance-chromaticity color space (HSL and HSV behave like this), the chromaticity will stay constant. The article [2] explains this difference in more detail.

A- This behaviour of Lab color space is pretty unintuitive to me. B- Turning down the brightness on a television behaves much like placing a neutral density gel in front of it; it does not behave like halving L*.

While it would be intuitive that Lab is an intuitive color space, I don't think it really is. And while it would make sense that turning down the brightness on a television wouldn't affect chrominance, it does. I think I've made this mistake before. Unintuitive? Yes.

Glennchan 03:37, 30 November 2006 (UTC)


A neutral density filter linearly scales XYZ values. But L* is nonlinearly related to XYZ values and is linearly related to perceived lightness.

If I take a white piece of paper and have someone compare it with and without a neutral density filter with 50% transmission - they will NOT say that it is half as light, because their perception is not linear. If I do the same experiement with a neutral density filter with 18% transmission - THEN they will say it is half as light. And if I display L* = 100 and L* = 50, they will say that L*=50 is half as light, because L* is a good match to human vision.

And matching perception is far more intuitive than trying to match the behavior of light because people are very familiar with their own perception, and not so familar with how it maps to actual photons.

You're right- I forget about the non-linearity in L*. Do you have a Wikipedia account by the way? I think you'd make some good contributions to the Wikipedia. Glennchan 03:36, 2 December 2006 (UTC)


[edit] Chromatic Value vs Chromatic Valance Spaces

CIELAB is an Adams Chromatic VALUE space. (Hunter) Lab is an Adams Chromatic VALANCE space. Would whoever keeps changing the classification of CIELAB to Adams Chromatic VALANCE kindly knock it off? Thank you in advance.

Lovibond 01:39, 9 February 2007 (UTC)

Can you provide a source? This would be the best way for editors to know what is right, and in the long term the entire article must be sourced. Notinasnaid 08:54, 9 February 2007 (UTC)

[edit] Visualizing LAB space

Figure 4.9 on page 73 of the book Photoshop Lab Color: The Canyon Conundrum and Other Adventures in the Most Powerful Colorspace, ISBN 032135 illustrates an excellent way to visualize the LAB space. I wonder if this diagram, or something similar to it can be made available here. --Lbeaumont 21:49, 20 March 2007 (UTC)

[edit] This article needs reorganization

This article covers material which is broader than the title, currently "Lab color space", implies. Putting aside the Lab/L*a*b* (Hunter Lab vs CIELAB) issue aside, color spaces which do not even include "a" and "b" as part of the nomenclature are being mentioned and discussed, such as CIELUV. I could imagine someone adding the OSA color space, whose coordinates are L, j, and g, and possibly the CIECAM Brightness/Colorfulness rectangular appearance space with coordinates Q, am, and bm. Is an article entitled "Lab Color Space" the right place for these, as well?

What I suggest is:

  • Create an article for Opponent Color and Appearance Spaces. Mention that Photoshop and similar applications use (a possibly encoded version of) CIELAB, with a link (see next item). Topics common to all these spaces (rectangular to/from cylindrical, opponent mechanisms, Hering et alli, etc). Beside the Photoshop etc issue, which is what people seeing this mentioned in these programs will want to know first and foremost, it should be written from a colorspace-neutral perspective.
  • Create individual articles for each opponent space: CIELAB, CIELUV, Hunter Lab, OSA, and CIECAM spaces. Maybe some historical ones, like U*V*W* and Hunter Lαβ, which would kind of clutter the existing works like the Hunter Lab thing seemed to have done.
  • Remove the redirection from "CIELAB" to "Lab Color Space" as CIELAB will need a dedicated article of its own, and "Lab" ≠ "CIELAB," as somebody has pointed out. Likewise for "CIELUV".
  • Redirect "Lab Color Space" to the new Opponent Color Space article mentioned above. Folks wondering what's under Photoshop's hood will need that discussion.

I can get some of these started, but I certainly don't want to mess around with the redirection business unless/until we're both ready and are in some kind of agreement. I believe one can edit a page which has a redirect at the top, and view it with an appropriate query string.

What say you, fellow editors and users? Shall this article be re-organized along these lines? Anybody have other (hopefully constructive) ideas? Lovibond 03:14, 5 April 2007 (UTC)