Function

CGColorGetComponents

Returns the values of the color components (including alpha) associated with a color.

Declaration

const CGFloat * CGColorGetComponents(CGColorRef color);

Parameters

color

A color.

Return Value

An array of intensity values for the color components (including alpha) associated with the specified color. The size of the array is one more than the number of components of the color space for the color.

See Also

Getting Information about Core Graphics Colors

CGColorEqualToColor

Indicates whether two colors are equal.

CGColorGetAlpha

Returns the value of the alpha component associated with a color.

CGColorGetColorSpace

Returns the color space associated with a color.

CGColorGetNumberOfComponents

Returns the number of color components (including alpha) associated with a color.

CGColorGetPattern

Returns the pattern associated with a color in a pattern color space.

CGColorGetTypeID

Returns the Core Foundation type identifier for a color data type.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software