init(red:green:blue:alpha:)
Initialize a Core Image color object in the sRGB color space with the specified red, green, blue, and alpha component values.
Declaration
convenience init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)Parameters
- red:
The color’s unpremultiplied red component value between 0 and 1.
- green:
The color’s unpremultiplied green component value between 0 and 1.
- blue:
The color’s unpremultiplied blue component value between 0 and 1.
- alpha:
The color’s alpha (opacity) value between 0 and 1.
Return Value
An initialized CIColor instance.
Discussion
On macOS before 10.10, the CIColor’s color space will be Generic RGB.