Convert CIE 1976 L*a*b* to RGB
If you specify the output RGB color space as 'linear-rgb'
,
then the output values are linearized sRGB values. If instead you want the
output color space to be linearized Adobe RGB (1998), then you can use the
rgb2lin
function.
For example, to convert CIE 1976 L*a*b* image LAB
to
linearized Adobe RGB (1998) color space, perform the conversion in two
steps:
RGBadobe = lab2rgb(LAB,'ColorSpace','adobe-rgb-1998'); RGBlinadobe = rgb2lin(RGBadobe,'ColorSpace','adobe-rgb-1998');
lab2rgb
can return color values that are out of the RGB
gamut. A converted RGB color is out of gamut when any
of its component values is less than 0 or greater than 1. For more information,
see Determine If L*a*b* Value Is in RGB Gamut.