Ok,I am now sufficiently confused with these off topic comments to request clarification. When I say "l*a*b" mode I am talking about that menu choice in ps - another choice is RGB and another choice is indexed color. My understanding is that pro photo , adobeRGB, and sRGB are colorspaces that only apply to RGB color. Why they have different gammas is not clear to me. Do we also speak of gamma with Lab mode, indexed color, etc?
RGB color spaces are defined by the relationship of their primary colors to 1931 CIE XYZ, and the nature of their non-linearity, if they have one. Their primaries are specified by a 3x3 matrix which, when multiplied by a color in XYZ (which is linear), yields the same color in the RGB color space before the non-linearity is applied. The convention in RGB color is to apply the same non-linearity to all three color planes. If there is no nonliterary, an RGB color space is called a
linear RGB space. Another way to say the same thing is that the gamma is one. The nonlinearities of common RGB spaces often are not pure power laws, but have a linear portion near zero. We photographers can safely ignore that nicety almost all the time, and just refer to the non-linearity by the number in the power law. Back in the dim past of photography and video, RGB color spaces were defined in terms of real monitors, so that the colors in an analog or data stream encoded in a particular monitor space would display properly on a monitor whose native space was that one. Because of this, we refer quaintly to gamma in the inverse of what would normally make sense. When we cay that a file is encoded in a RGB space with a gamma of 2.2, we really mean that it is encoded such that
it will display properly on a physical or mathematical monitor with a gamma of 2.2. To get from linear, say R, to R with a gamma of 2.2, assuming R is in the range [0,1], we raise the linear values to the power of 1/2.2 or 0.454545. To get back to linear, we raise the encoded values to the power 2.2.
With modern color management, the colors in RGB files are encoded for abstract, ideal monitors. Some of these monitors are pure mathematical constructs, and can never be created. An example is ProPhotoRGB, which has two physically unreliable primaries. Gamma compressed RGB just happens to be a convenient way to encode color, and an efficient one with gammas between say, 1.8 and 4, since the human's response to varying light intensity under some laboratory conditions goes approximately as the cube root of the light intensity, so files encoded in that range of gamma don't waste a lot of space on distinctions that don't make much difference to humans, unless they have extreme primaries like ProPhotoRGB.
You need to understand the gamma of an RGB file only if you're planning on looking closely at the histogram. The choice is usually between 1.8 and 2.2, the most common gammas for RGB encodings. If you're interested, I can compute some histograms for files encoded with various gammas, and you can see how that works. If your looking at L*'s histogram in Photoshop be aware that it has power law scaling very like that of each of the three planes in an RGB image. 18% gray is in the middle (right in the middle with the twist on the power lab that the CIE specified for L*; if it were a pure 1/3 power law, 18% gray would map to L* =~ 56), for example, not on the left as you'd find in a linear representation. We don't speak of gamma when we talk about Lab, because the non-linearity is always the same, unlike RGB color spaces, which can have different non-linearities.
You brought up indexed color. The indices don't have gamma, but the indices point to tables that convert them to RGB triplets in some RGB color space. From then on, it's as if the images were directly encoded in that space, which does have a gamma, and primaries, and a white point. Let me know if you need more explanation on that point, This post is getting long and my hands are tired.
Jim