Instance Property

type

The type of the color object.

Declaration

var type: NSColor.ColorType { get }

Discussion

A color object's type determines which of its methods and properties you may access. For example, if the type is NSColor.ColorType.pattern, you may safely access the patternImage property.

See Also

Working with the Color Space

func usingType(NSColor.ColorType) -> NSColor?

Returns a version of the color object that is compatible with the specified color type.

enum NSColor.ColorType

Constants indicating the color's type, and which methods may be called on the color object.

var colorSpace: NSColorSpace

The color space associated with the color.

var colorSpaceName: NSColorSpaceName

The name of the color space associated with the color.

Deprecated
struct NSColorSpaceName

Color space names.