Instance Property

cgColor

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

Declaration

var cgColor: CGColor { get }

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.