getComponents(_:)
Returns the components of the color as an array.
Declaration
func getComponents(_ components: UnsafeMutablePointer<CGFloat>)Parameters
- components:
An array containing the components of the color object as
floatvalues.
Discussion
You can invoke this method on NSColor objects created from custom color spaces to get the individual floating-point components, including alpha. Raises an exception if the receiver doesn’t have floating-point components. To find out how many components are in the components array, use the numberOfComponents property.