Instance Method


Returns the NSColor object associated with the given key.


func color(withKey key: NSColor.Name) -> NSColor?



The key for which to retrieve the color.

Return Value

The color associated with the given key or nil if there is none.

See Also

Managing Colors By Key

var allKeys: [NSColor.Name]

An array of the keys by which the NSColor objects are stored in the receiver.

func insertColor(NSColor, key: NSColor.Name, at: Int)

Inserts the specified color at the specified location in the receiver.

func removeColor(withKey: NSColor.Name)

Removes the color associated with the specified key from the receiver.

func setColor(NSColor, forKey: NSColor.Name)

Associates the specified NSColor object with the specified key.