lab2xyz
Convert CIE 1976 L*a*b* to CIE 1931 XYZ
Description
Examples
Convert L*a*b* Color to XYZ
Convert an L*a*b* color value to XYZ using the default reference white point, D65.
lab2xyz([50 10 -5])
ans = 1×3
0.1942 0.1842 0.2282
Convert L*a*b* Color to XYZ Specifying Whitepoint
Convert an L*a*b* color value to XYZ specifying the D50 whitepoint.
lab2xyz([50 10 -5],'WhitePoint','d50')
ans = 1×3
0.1970 0.1842 0.1729
Input Arguments
lab
— L*a*b* color values
numeric array
Color values to convert, specified as a numeric array in one of these formats.
c-by-3 colormap. Each row specifies one L*a*b* color value.
m-by-n-by-3 image
m-by-n-by-3-by-p stack of images
Attribute | Description |
---|---|
L* | Luminance or brightness of the image. Values are in the range [0, 100], where 0 specifies black and 100 specifies white. As L* increases, colors become brighter. |
a* | Amount of red or green tones in the image. A large positive a* value corresponds to red/magenta. A large negative a* value corresponds to green. Although there is no single range for a*, values commonly fall in the range [-100, 100] or [-128, 127). |
b* | Amount of yellow or blue tones in the image. A large positive b* value corresponds to yellow. A large negative b* value corresponds to blue. Although there is no single range for b*, values commonly fall in the range [-100, 100] or [-128, 127). |
Data Types: single
| double
whitePoint
— Reference white point
'd65'
(default) | 'a'
| 'c'
| 'e'
| 'd50'
| 'd55'
| 'icc'
| 1-by-3 vector
Reference white point, specified as a 1-by-3 vector or one of the CIE standard illuminants listed in the table.
Value | White Point |
---|---|
"a" | CIE standard illuminant A, |
"c" | CIE standard illuminant C, [0.9807, 1.0000, 1.1822] . Simulates average or
north sky daylight with correlated color temperature of 6774 K. Deprecated by
CIE. |
"e" | Equal-energy radiator, [1.000, 1.000, 1.000] . Useful as a theoretical
reference. |
"d50" | CIE standard illuminant D50, [0.9642, 1.0000, 0.8251] .
Simulates warm daylight at sunrise or sunset with correlated color
temperature of 5003 K. Also known as horizon light. |
| CIE standard illuminant D55, |
"d65" | CIE standard illuminant D65, [0.9504, 1.0000, 1.0888] . Simulates noon
daylight with correlated color temperature of 6504 K. |
"icc" | Profile Connection Space (PCS) illuminant used in ICC profiles. Approximation of
[0.9642, 1.000, 0.8249] using fixed-point, signed, 32-bit
numbers with 16 fractional bits. Actual value: [31595,32768,
27030]/32768 . |
Data Types: single
| double
| char
Output Arguments
xyz
— Converted XYZ color values
numeric array
Converted XYZ color values, returned as a numeric array of the same shape and type as the input.
Version History
Introduced in R2014b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)