Creates a Core Image color object with the specified red, green, blue, and alpha component values as measured in the specified color space.
SDKs
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
Framework
- Core Image
Declaration
+ (instancetype)colorWithRed:(CGFloat)r green:(CGFloat)g blue:(CGFloat)b alpha:(CGFloat)a colorSpace:(CGColor Space Ref)colorSpace;
Parameters
r
The unpremultiplied red component of the color.
g
The unpremultiplied green component of the color.
b
The unpremultiplied blue component of the color.
a
The alpha (opacity) component of the color.
colorSpace
The color space in which to create the new color. This color space must conform to the
k
color space model.CGColor Space Model RGB
Return Value
The resulting Core Image color.