<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColorPicker",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSColorPicker"
  },
  "title" : "NSColorPicker"
}
-->

# NSColorPicker

An abstract superclass that implements the default color picking protocol.

```
class NSColorPicker
```

## Overview

The [`NSColorPickingDefault`](/documentation/AppKit/NSColorPickingDefault) and [`NSColorPickingCustom`](/documentation/AppKit/NSColorPickingCustom) protocols define a way to add color pickers (custom user interfaces for color selection) to the color panel.

## Topics

### Initializing the Color Picker Object

[`-  initWithPickerMask:colorPanel:`](/documentation/AppKit/NSColorPicker/init(pickerMask:colorPanel:))

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

### Getting the Color Panel

[`colorPanel`](/documentation/AppKit/NSColorPicker/colorPanel)

The color panel instance that owns the color picker.

### Adding Button Images

[`-  insertNewButtonImage:in:`](/documentation/AppKit/NSColorPicker/insertNewButtonImage(_:in:))

Sets the image used for the specified button cell.

[`provideNewButtonImage`](/documentation/AppKit/NSColorPicker/provideNewButtonImage)

The button image used by the color picker.

### Setting the Mode

[`-  setMode:`](/documentation/AppKit/NSColorPicker/setMode(_:))

Overriden to set the color picker’s mode.

### Managing Color Lists

[`-  attachColorList:`](/documentation/AppKit/NSColorPicker/attachColorList(_:))

Overriden to attach a color list to a color picker.

[`-  detachColorList:`](/documentation/AppKit/NSColorPicker/detachColorList(_:))

Overriden to detach a color list from a color picker.

### Responding to View Changes

[`-  viewSizeChanged:`](/documentation/AppKit/NSColorPicker/viewSizeChanged(_:))

Overriden to respond to a size change.

### Customizing the Color Picker

[`buttonToolTip`](/documentation/AppKit/NSColorPicker/buttonToolTip)

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

[`minContentSize`](/documentation/AppKit/NSColorPicker/minContentSize)

The minimum content size.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSColorPickingDefault`](/documentation/AppKit/NSColorPickingDefault)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)