An NSColorWell object is an NSControl for selecting and displaying a single color value. An example of an NSColorWell object (or simply color well) is found in an NSColorPanel, which uses a color well to display the current color selection. A color well is available from the Palettes panel of Interface Builder.


Managing Color From Color Wells

var color: NSColor

The color of the receiver.

func takeColorFrom(Any?)

Changes the color of the receiver to that of the specified object.

Activating and Deactivating Color Wells

func activate(Bool)

Activates the receiver, displays the color panel, and makes the current color the same as its own.

var isActive: Bool

A Boolean value that determines whether the color well is active.

func deactivate()

Deactivates the receiver and redraws it.

Managing Borders of Color Wells

var isBordered: Bool

A Boolean value that determines whether the receiver has a border.

Drawing a Color Well

func drawWell(inside: NSRect)

Draws the colored area inside the receiver at the specified location without drawing borders.


Inherits From