Instance Property

CGColor

The Quartz color reference that corresponds to the receiver’s color.

Declaration

@property(nonatomic, readonly) CGColorRef CGColor;

Discussion

The color object in this property does not adapt automatically to Dark Mode changes. If you use it to set the color of interface elements, you must update that color yourself when the userInterfaceStyle trait of the current trait collection changes. For information on how to apply color information reliably, see Supporting Dark Mode in Your Interface.

See Also

Getting the Color Information

- CGColor

The Quartz color reference that corresponds to the receiver’s color.

CIColor

The Core Image color associated with the receiver.

- getHue:saturation:brightness:alpha:

Returns the components that make up the color in the HSB color space.

- getRed:green:blue:alpha:

Returns the components that make up the color in the RGB color space.

- getWhite:alpha:

Returns the grayscale components of the color.