A set of components that define a color, with a color space specifying how to interpret them.


CGColorRef is the fundamental data type used internally by Core Graphics to represent colors. CGColor objects, and the functions that operate on them, provide a fast and convenient way of managing and setting colors directly, especially colors that are reused (such as black for text).

A color object contains a set of components (such as red, green, and blue) that uniquely define a color, and a color space that specifies how those components should be interpreted.

Color objects provide a fast and convenient way to manage and set colors, especially colors that are used repeatedly. Drawing operations use color objects for setting fill and stroke colors, managing alpha, and setting color with a pattern.

CGColorRef is derived from CFTypeRef and inherits the properties that all Core Foundation types have in common.

See Also

Colors and Fonts


An object that describes how to convert between color spaces for use by other system services.


A profile that specifies how to interpret a color value for display.


A set of character glyphs and layout information for drawing text.