Instance Method

getRed(_:green:blue:alpha:)

Returns the receiver’s RGB component and opacity values in the respective arguments.

Declaration

Parameters

red

Upon return, contains the red component of the color object.

green

Upon return, contains the green component of the color object.

blue

Upon return, contains the blue component of the color object.

alpha

Upon return, contains the opacity value of the color object.

Discussion

If NULL is passed in as an argument, the method doesn’t set that value. This method works only with objects representing colors in the calibratedRGB or deviceRGB color space. Sending it to other objects raises an exception.

See Also