![]() |
PATH![]() |
![]() ![]() |
See Converting Between Color Spaces for a description of the color conversion capabilities the ColorSync Manager provides. That section also describes color conversion prior to ColorSync version 2.1.
The ColorSync Manager provides the following functions to convert colors between a base color space and any of its derived color spaces or between two derivatives of the same base family.
CMConvertXYZToLab
converts colors specified in the XYZ color space to the L*a*b* color space.CMConvertLabToXYZ
converts colors specified in the L*a*b* color space to the XYZ color space.CMConvertXYZToLuv
converts colors specified in the XYZ color space to the L*u*v* color space.CMConvertLuvToXYZ
converts colors specified in the L*u*v* color space to the XYZ color space.CMConvertXYZToYxy
converts colors specified in the XYZ color space to the Yxy color space.CMConvertYxyToXYZ
converts colors specified in the Yxy color space to the XYZ color space.CMConvertXYZToFixedXYZ
converts colors specified in the XYZ color space whose components are expressed as XYZ 16-bit unsigned values of type
CMXYZColor
to equivalent colors expressed as 32-bit signed values of type
CMFixedXYZColor
.CMConvertFixedXYZToXYZ
converts colors specified in XYZ color space whose components are expressed as Fixed XYZ 32-bit signed values of type
CMFixedXYZColor
to equivalent colors expressed as XYZ 16-bit unsigned values of type
CMXYZColor
.CMConvertRGBToHLS
converts colors specified in the RGB color space to equivalent colors defined in the HLS color space.CMConvertHLSToRGB
converts colors specified in the HLS color space to equivalent colors defined in the RGB color space.CMConvertRGBToHSV
converts colors specified in the RGB color space to equivalent colors defined in the HSV color space when the device types are the same.CMConvertHSVToRGB
converts colors specified in the HSV color space to equivalent colors defined in the RGB color space.CMConvertRGBToGray
converts colors specified in the RGB color space to equivalent colors defined in the Gray color space.Converts colors specified in the XYZ color space to the L*a*b* color space.
pascal CMError CMConvertXYZToLab (
const CMColor *src,
const CMXYZColor *white,
CMColor *dst,
unsigned long count);
The CMConvertXYZToLab function converts one or more colors defined in the XYZ color space to equivalent colors defined in the L*a*b* color space. Both color spaces are device independent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertXYZToLab function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the L*a*b* color space to the XYZ color space.
pascal CMError CMConvertLabToXYZ (
const CMColor *src,
const CMXYZColor *white,
CMColor *dst,
unsigned long count);
The CMConvertLabToXYZ function converts one or more colors defined in the L*a*b color space to equivalent colors defined in the XYZ color space. Both color spaces are device independent.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the XYZ color space to the L*u*v* color space.
pascal CMError CMConvertXYZToLuv (
const CMColor *src,
const CMXYZColor *white,
CMColor *dst,
unsigned long count);
The CMConvertXYZToLuv function converts one or more colors defined in the XYZ color space to equivalent colors defined in the L*u*v* color space. Both color spaces are device independent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertXYZToLuv function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the L*u*v* color space to the XYZ color space.
pascal CMError CMConvertLuvToXYZ (
const CMColor *src,
const CMXYZColor *white,
CMColor *dst,
unsigned long count);
The CMConvertLuvToXYZ function converts one or more colors defined in the L*u*v color space to equivalent colors defined in the XYZ color space. Both color spaces are device independent.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the XYZ color space to the Yxy color space.
pascal CMError CMConvertXYZToYxy (
const CMColor *src,
CMColor *dst,
unsigned long count);
The CMConvertXYZToYxy function converts one or more colors defined in the XYZ color space to equivalent colors defined in the Yxy color space. Both color spaces are device independent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertXYZToYxy function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the Yxy color space to the XYZ color space.
pascal CMError CMConvertYxyToXYZ (
const CMColor *src,
CMColor *dst,
unsigned long count);
The CMConvertYxyToXYZ function converts one or more colors defined in the Yxy color space to equivalent colors defined in the XYZ color space. Both color spaces are device independent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertYxyToXYZ function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the XYZ color space whose components are expressed as XYZ 16-bit unsigned values of type CMXYZColor to equivalent colors expressed as 32-bit signed values of type CMFixedXYZColor .
pascal CMError CMConvertXYZToFixedXYZ (
const CMXYZColor *src,
CMFixedXYZColor *dst,
unsigned long count);
The CMConvertXYZToFixedXYZ function converts one or more colors whose components are defined as XYZ colors to equivalent colors whose components are defined as Fixed XYZ colors. Fixed XYZ colors allow for 32-bit precision. The XYZ color space is device independent.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in XYZ color space whose components are expressed as Fixed XYZ 32-bit signed values of type CMFixedXYZColor to equivalent colors expressed as XYZ 16-bit unsigned values of type CMXYZColor .
pascal CMError CMConvertFixedXYZToXYZ (
const CMFixedXYZColor *src,
CMXYZColor *dst,
unsigned long count);
The CMConvertFixedXYZToXYZ function converts one or more colors defined in the Fixed XYZ color space to equivalent colors defined in the XYZ color space. The XYZ color space is device independent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertFixedXYZToXYZ function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the RGB color space to equivalent colors defined in the HLS color space.
pascal CMError CMConvertRGBToHLS (
const CMColor *src,
CMColor *dst,
unsigned long count);
The CMConvertRGBToHLS function converts one or more colors defined in the RGB color space to equivalent colors defined in the HLS color space. Both color spaces are device dependent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertRGBToHLS function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the HLS color space to equivalent colors defined in the RGB color space.
pascal CMError CMConvertHLSToRGB (
const CMColor *src,
CMColor *dst,
unsigned long count);
The CMConvertHLSToRGB function converts one or more colors defined in the HLS color space to equivalent colors defined in the RGB color space. Both color spaces are device dependent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertHLSToRGB function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the RGB color space to equivalent colors defined in the HSV color space when the device types are the same.
pascal CMError CMConvertRGBToHSV (
const CMColor *src,
CMColor *dst,
unsigned long count);
The CMConvertRGBToHSV function converts one or more colors defined in the RGB color space to equivalent colors defined in the HSV color space. Both color spaces are device dependent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertRGBToHSV function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the HSV color space to equivalent colors defined in the RGB color space.
pascal CMError CMConvertHSVToRGB (
const CMColor *src,
CMColor *dst,
unsigned long count);
The CMConvertHSVToRGB function converts one or more colors defined in the HSV color space to equivalent colors defined in the RGB color space. Both color spaces are device dependent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertHSVToRGB function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .
Converts colors specified in the RGB color space to equivalent colors defined in the Gray color space.
pascal CMError CMConvertRGBToGray (
const CMColor *src,
CMColor *dst,
unsigned long count);
The CMConvertRGBToGray function converts one or more colors defined in the RGB color space to equivalent colors defined in the Gray color space. Both color spaces are device dependent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertRGBToGray function to overwrite the source colors with the resulting converted color specifications.
For information about the color conversion routines in previous versions of ColorSync, see Converting Between Color Spaces .