Class

NSColorPicker

The NSColorPicker class is an abstract superclass that implements the NSColorPickingDefault protocol. The NSColorPickingDefault and NSColorPickingCustom protocols define a way to add color pickers (custom user interfaces for color selection) to the NSColorPanel.

Symbols

Initializing an NSColorPicker Object

init?(pickerMask: Int, colorPanel: NSColorPanel)

Initializes the color picker with the specified color panel and color picker mode mask.

Getting the Color Panel

var colorPanel: NSColorPanel

The NSColorPanel instance that owns the color picker.

Adding Button Images

func insertNewButtonImage(NSImage, in: NSButtonCell)

Sets the image used for the specified button cell.

var provideNewButtonImage: NSImage

The button image used by the color picker.

Setting the Mode

func setMode(NSColorPanelMode)

Does nothing. Override to set the color picker’s mode.

Managing Color Lists

func attachColorList(NSColorList)

Does nothing. Override to attach a color list to a color picker.

func detachColorList(NSColorList)

Does nothing. Override to detach a color list from a color picker.

Responding to View Changes

func viewSizeChanged(Any?)

Does nothing. Override to respond to a size change.

Customizing the Color Picker

var buttonToolTip: String

The tool tip that is shown when the mouse cursor is over the color picker’s button image.

var minContentSize: NSSize

the minimum content size.

Relationships

Inherits From