Main Content
rgb2xyz
Convert RGB to CIE 1931 XYZ
Description
Examples
Input Arguments
Output Arguments
Tips
If you specify the input RGB color space as
"linear-rgb"
, thenrgb2xyz
assumes the input values are linearized sRGB values. If instead you want the input color space to be linearized Adobe RGB (1998), then you can use thelin2rgb
function.For example, to convert linearized Adobe RGB (1998) image
RGBlinadobe
to CIE 1931 XYZ color space, perform the conversion in two steps:RGBadobe = lin2rgb(RGBlinadobe,"ColorSpace","adobe-rgb-1998"); XYZ = rgb2xyz(RGBadobe,"ColorSpace","adobe-rgb-1998");