Standard Colors

Retrieve the standard color objects for common colors like red, blue, green, black, white, and more.

Topics

Adaptable System Colors

class var systemBlue: NSColor

Returns a color object for blue that automatically adapts to vibrancy and accessibility settings.

class var systemBrown: NSColor

Returns a color object for brown that automatically adapts to vibrancy and accessibility settings.

class var systemGray: NSColor

Returns a color object for gray that automatically adapts to vibrancy and accessibility settings.

class var systemGreen: NSColor

Returns a color object for green that automatically adapts to vibrancy and accessibility settings.

class var systemOrange: NSColor

Returns a color object for orange that automatically adapts to vibrancy and accessibility settings.

class var systemPink: NSColor

Returns a color object for pink that automatically adapts to vibrancy and accessibility settings.

class var systemPurple: NSColor

Returns a color object for purple that automatically adapts to vibrancy and accessibility settings.

class var systemRed: NSColor

Returns a color object for red that automatically adapts to vibrancy and accessibility settings.

class var systemYellow: NSColor

Returns a color object for yellow that automatically adapts to vibrancy and accessibility settings.

Transparent Color

class var clear: NSColor

Returns a color object whose grayscale and alpha values are both 0.0.

Fixed Colors

class var black: NSColor

Returns a color object whose grayscale value is 0.0 and whose alpha value is 1.0.

class var blue: NSColor

Returns a color object whose RGB value is 0.0, 0.0, 1.0 and whose alpha value is 1.0.

class var brown: NSColor

Returns a color object whose RGB value is 0.6, 0.4, 0.2 and whose alpha value is 1.0.

class var cyan: NSColor

Returns a color object whose RGB value is 0.0, 1.0, 1.0 and whose alpha value is 1.0.

class var darkGray: NSColor

Returns a color object whose grayscale value is 1/3 and whose alpha value is 1.0.

class var gray: NSColor

Returns a color object whose grayscale value is 0.5 and whose alpha value is 1.0.

class var green: NSColor

Returns a color object whose RGB value is 0.0, 1.0, 0.0 and whose alpha value is 1.0.

class var lightGray: NSColor

Returns a color object whose grayscale value is 2/3 and whose alpha value is 1.0.

class var magenta: NSColor

Returns a color object whose RGB value is 1.0, 0.0, 1.0 and whose alpha value is 1.0.

class var orange: NSColor

Returns a color object whose RGB value is 1.0, 0.5, 0.0 and whose alpha value is 1.0.

class var purple: NSColor

Returns a color object whose RGB value is 0.5, 0.0, 0.5 and whose alpha value is 1.0.

class var red: NSColor

Returns a color object whose RGB value is 1.0, 0.0, 0.0 and whose alpha value is 1.0.

class var white: NSColor

Returns a color object whose grayscale and alpha values are both 1.0.

class var yellow: NSColor

Returns a color object whose RGB value is 1.0, 1.0, 0.0 and whose alpha value is 1.0.

See Also

Getting and Creating Colors

UI Element Colors

Retrieve standard color objects for use with windows, controls, labels, text, selections and other content in your app.

Color Creation

Load colors from asset catalogs, and create colors from raw component values, such as those used by grayscale, RGB, HSB, and CMYK colors.