init(colorSpace:components:)
Creates a color using a list of intensity values (including alpha) and an associated color space.
Declaration
init?(colorSpace space: CGColorSpace, components: UnsafePointer<CGFloat>)Parameters
- space:
A color space for the new color. Core Graphics retains this object; upon return, you may safely release it.
- components:
An array of intensity values describing the color. The array should contain n+1 values that correspond to the n color components in the specified color space, followed by the alpha component. Each component value should be in the range appropriate for the color space. Values outside this range will be clamped to the nearest correct value.
Return Value
A new color. In Objective-C, you’re responsible for releasing this object using CGColorRelease.