Instance Property
numberOfComponents
Returns the number of color components in the color.
SDKs
- iOS 5.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
Declaration
@property(readonly) size_t numberOfComponents;
Discussion
This number includes the alpha component if the color contains one.
See Also
Getting Color Components
colorSpace
The Quartz 2D color space associated with the color.
red
The unpremultiplied red component of the color.
green
The unpremultiplied green component of the color.
blue
The unpremultiplied blue component of the color.
alpha
The alpha value of the color.