Standard Colors

The standard color objects for specific shades, such as red, blue, green, black, white, and more.

Overview

Use the standard color objects when you want to use a specific color shade in your UI.

The system color objects adapt automatically to Dark Mode changes when you use the provided UIColor object, but the fixed-shade colors don't adapt. If you retrieve the color values, either directly or using another type such as CGColorRef, you must handle Dark Mode changes yourself. For more information about supporting Dark Mode, see Supporting Dark Mode in Your Interface.

Topics

Adaptable Colors

systemBlueColor

A blue color that automatically adapts to the current trait environment.

systemGreenColor

A green color that automatically adapts to the current trait environment.

systemIndigoColor

An indigo color that automatically adapts to the current trait environment.

Beta
systemOrangeColor

An orange color that automatically adapts to the current trait environment.

systemPinkColor

A pink color that automatically adapts to the current trait environment.

systemPurpleColor

A purple color that automatically adapts to the current trait environment.

systemRedColor

A red color that automatically adapts to the current trait environment.

systemTealColor

A teal color that automatically adapts to the current trait environment.

systemYellowColor

A yellow color that automatically adapts to the current trait environment.

Adaptable Gray Colors

systemGrayColor

The base gray color.

systemGray2Color

A second-level shade of grey.

Beta
systemGray3Color

A third-level shade of grey.

Beta
systemGray4Color

A fourth-level shade of grey.

Beta
systemGray5Color

A fifth-level shade of grey.

Beta
systemGray6Color

A sixth-level shade of grey.

Beta

Transparent Color

clearColor

A color object with grayscale and alpha values that are both 0.0.

Fixed Colors

blackColor

A color object in the sRGB color space with a grayscale value of 0.0 and an alpha value of 1.0.

blueColor

A color object with RGB values of 0.0, 0.0, and 1.0, and an alpha value of 1.0.

brownColor

A color object with RGB values of 0.6, 0.4, and 0.2, and an alpha value of 1.0.

cyanColor

A color object with RGB values of 0.0, 1.0, and 1.0, and an alpha value of 1.0.

darkGrayColor

A color object with a grayscale value of 1/3 and an alpha value of 1.0.

grayColor

A color object with a grayscale value of 0.5 and an alpha value of 1.0.

greenColor

A color object with RGB values of 0.0, 1.0, and 0.0, and an alpha value of 1.0.

lightGrayColor

A color object with a grayscale value of 2/3 and an alpha value of 1.0.

magentaColor

A color object with RGB values of 1.0, 0.0, and 1.0, and an alpha value of 1.0.

orangeColor

A color object with RGB values of 1.0, 0.5, and 0.0, and an alpha value of 1.0.

purpleColor

A color object with RGB values of 0.5, 0.0, and 0.5, and an alpha value of 1.0.

redColor

A color object with RGB values of 1.0, 0.0, and 0.0, and an alpha value of 1.0.

whiteColor

A color object with a grayscale value of 1.0 and an alpha value of 1.0.

yellowColor

A color object with RGB values of 1.0, 1.0, and 0.0, and an alpha value of 1.0.

See Also

Getting Existing Colors

UI Element Colors

The standard color objects you can use for labels, text, backgrounds, links, and more.

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