Steve on Image Processing with MATLAB

Image processing concepts, algorithms, and MATLAB


Steve on Image Processing with MATLAB has been archived and will not be updated.

Out-of-gamut colors

The set of colors that can be represented using a particular color space is called the gamut. Some L*a*b* color values may be out of gamut when converted to RGB. You know that a converted RGB color is out of gamut when any of its component values is less than 0 or greater than 1.

lab = [80 -130 85];
ans =

   -0.6210    0.9537   -0.1926

The negative values demonstrate that the L*a*b* color [80 -130 85] is not in the gamut of the sRGB color space, which is the default RGB color space used by lab2rgb. A different RGB color space, Adobe RGB (1998), has a larger gamut than sRGB. Use the 'ColorSpace' parameter to convert a L*a*b* color to the Adobe color space.

ans =

    0.1234    0.9522    0.1073

Because all the output values are between 0.0 and 1.0 (inclusive), you can conclude that the L*a*b* color [80 -130 85] is inside the Adobe RGB (1998) gamut.

Published with MATLAB® R2015a

  • print


要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。