Function

CGColorSpaceGetNumberOfComponents

Returns the number of color components in a color space.

Declaration

size_t CGColorSpaceGetNumberOfComponents(CGColorSpaceRef space);

Parameters

cs

The color space to examine.

Return Value

The number of color components in the specified color space, not including the alpha value.

Discussion

A color space defines an n-dimensional space whose dimensions (or components) represent intensity values. Use this function to obtain the number of components in a given color space: for example, in an RGB color space this function returns 3 (for the three intensity values red, green, and blue).

See Also

Getting Information About Color Spaces

CGColorSpaceCopyICCProfile

Returns a copy of the ICC profile of the provided color space.

Deprecated
CGColorSpaceCopyICCData

Returns a copy of the ICC profile data of the provided color space.

CGColorSpaceSupportsOutput

Returns a Boolean indicating whether the color space can be used as a destination color space.

CGColorSpaceGetTypeID

Returns the Core Foundation type identifier for Quartz color spaces.

CGColorSpaceGetModel

Returns the color space model of the provided color space.

CGColorSpaceIsWideGamutRGB

Returns whether the RGB color space covers a significant portion of the NTSC color gamut.

CGColorSpaceGetBaseColorSpace

Returns the base color space of a pattern or indexed color space.

CGColorSpaceGetColorTableCount

Returns the number of entries in the color table of an indexed color space.

CGColorSpaceGetColorTable

Copies the entries in the color table of an indexed color space.

CGColorSpaceCopyName

Returns the name used to create the specified color space.