Instance Method

initWithRed:green:blue:alpha:colorSpace:

Initializes a Core Image color object with the specified red, green, blue, and alpha component values as measured in the specified color space.

Declaration

- (instancetype)initWithRed:(CGFloat)r green:(CGFloat)g blue:(CGFloat)b alpha:(CGFloat)a colorSpace:(CGColorSpaceRef)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 kCGColorSpaceModelRGB color space model.

Return Value

The resulting Core Image color.

See Also

Initializing Color Objects

- initWithCGColor:

Initializes a Core Image color object with a Core Graphics color.

- initWithColor:

Initializes a Core Image color object using a UIKit (or AppKit) color object.

- initWithRed:green:blue:

Initializes a Core Image color object with the specified red, green, and blue component values.

- initWithRed:green:blue:alpha:

Initializes a Core Image color object with the specified red, green, blue, and alpha component values.

- initWithRed:green:blue:colorSpace:

Initializes a Core Image color object with the specified red, green, and blue component values as measured in the specified color space.