You are here : matlabImage Processingxyz2rgb

xyz2rgb() - Image Processing

rgb = xyz2rgb(xyz) converts
CIE 1931 XYZ values to RGB values. examplergb = xyz2rgb(xyz,Name,Value) specifies
additional options with one or more Name,Value pair arguments.


Syntax

rgb = xyz2rgb(xyz) examplergb = xyz2rgb(xyz,Name,Value) example


Example

Convert XYZ color to sRGBOpen This ExampleConvert a color value in the XYZ color space to the sRGB color space.xyz2rgb([0.25 0.40 0.10])

ans =

    0.4174    0.7434    0.2152

Convert XYZ Color to Adobe RGBOpen This Example
Convert the color value in XYZ color space to the Adobe RGB (1998) color space.xyz2rgb([0.25 0.40 0.10],'ColorSpace','adobe-rgb-1998')

ans =

    0.5323    0.7377    0.2730

Convert XYZ color to sRGB Specifying WhitepointOpen This Example
Convert an XYZ color value to sRGB specifying the D50 whitepoint.xyz2rgb([0.25 0.40 0.10],'WhitePoint','d50')

ans =

    0.3276    0.7517    0.2869

Convert XYZ color to 8-bit-encoded RGB ColorOpen This Example
Convert an XYZ color value to an 8-bit encoded RGB color value.xyz2rgb([0.25 0.40 0.10],'OutputType','uint8')

ans =

  106  190   55


Output / Return Value


Limitations


Alternatives / See Also


Reference