Instance Property

numberOfComponents

Returns the number of color components in a color space.

Declaration

var numberOfComponents: Int { get }

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 property to obtain the number of components in a given color space: for example, in an RGB color space this value is 3 (for the three intensity values red, green, and blue).

See Also

Examining a Color Space

var baseColorSpace: CGColorSpace?

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

var model: CGColorSpaceModel

Returns the color space model of the provided color space.

enum CGColorSpaceModel

Models for color spaces.

var colorTable: [UInt8]?

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

func copyICCData() -> CFData?

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

var iccData: CFData?

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

Deprecated
var name: CFString?

Returns the name used to create the specified color space.

var supportsOutput: Bool

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

var isWideGamutRGB: Bool

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

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