Contents

numberOfComponents

Returns the color components of the color including alpha.

Declaration

var numberOfComponents: Int { get }

Discussion

This number includes the alpha component if the color contains one.

Typically this number will be 4 for red, green, blue, and alpha. If the CIColor was initialized with a CGColor then the number will be the same as calling CGColorGetNumberOfComponents()

See Also

Getting Color Components