Type Method

colorWithRed:green:blue:alpha:colorSpace:

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

Declaration

+ (instancetype)colorWithRed:(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

Creating Color Objects

+ colorWithCGColor:

Creates a color object from a Quartz color.

+ colorWithRed:green:blue:

Creates a color object using the specified RGB color component values

+ colorWithRed:green:blue:alpha:

Creates a color object using the specified RGBA color component values.

+ colorWithString:

Creates a color object using the RGBA color component values specified by a string.

+ colorWithRed: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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software