Carbon


CMColor

Header: CMApplication.h

union CMColor {
    CMRGBColor rgb; 
    CMHSVColor hsv; 
    CMHLSColor hls; 
    CMXYZColor XYZ; 
    CMLabColor Lab; 
    CMLuvColor Luv; 
    CMYxyColor Yxy; 
    CMCMYKColor cmyk; 
    CMCMYColor cmy; 
    CMGrayColor gray; 
    CMMultichannel5Color mc5; 
    CMMultichannel6Color mc6; 
    CMMultichannel7Color mc7; 
    CMMultichannel8Color mc8; 
    CMNamedColor namedColor;
};

Field descriptions

rgb

A color value expressed in the RGB color space as data of type CMRGBColor.

hsv

A color value expressed in the HSV color space as data of type CMHSVColor.

hls

A color value expressed in the HLS color space as data of type CMHLSColor.

XYZ

A color value expressed in the XYZ color space as data of type CMXYZColor.

Lab

A color value expressed in the L*a*b* color space as data of type CMLabColor.

Luv

A color value expressed in the L*u*v* color space as data of type CMLuvColor.

Yxy

A color value expressed in the Yxy color space as data of type CMYxyColor.

cmyk

A color value expressed in the CMYK color space as data of type CMCMYKColor.

cmy

A color value expressed in the CMY color space as data of type CMCMYColor.

gray

A color value expressed in the Gray color space as data of type CMGrayColor.

mc5

A color value expressed in the five-channel multichannel color space as data of type CMMultichannel5Color. See CMMultichannel5Color for a description of the CMMultichannel5Color data type.

mc6

A color value expressed in the six-channel multichannel color space as data of type CMMultichannel6Color. See CMMultichannel6Color for a description of the CMMultichannel6Color data type.

mc7

A color value expressed in the seven-channel multichannel color space as data of type CMMultichannel7Color. See CMMultichannel7Color for a description of the CMMultichannel7Color data type.

mc8

A color value expressed in the eight-channel multichannel color space as data of type CMMultichannel8Color. See CMMultichannel8Color for a description of the CMMultichannel8Color data type.

namedColor

A color value expressed as an index into a named color space. See CMNamedColor for a description of the CMNamedColor data type.

A color union can contain one of the above fields.

Your application can use a union of type CMColor to specify a color value defined by one of the 15 data types supported by the union. Your application uses an array of color unions to specify a list of colors to match, check, or convert. The array is passed as a parameter to the general purpose color matching, color checking, or color conversion functions. The following functions use a color union:

You do not use a union of type CMColor to convert colors expressed in the XYZ color space as values of type CMFixedXYZ because the CMColor union does not support the CMFixedXYZ data type.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)