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

# NSColorPickerTouchBarItem

A bar item that provides a system-defined color picker.

```
class NSColorPickerTouchBarItem
```

## Overview

For design guidance, see [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/macos/touch-bar/touch-bar-controls-and-views/#color-pickers).

## Topics

### Creating a color picker item

[`colorPicker(withIdentifier:)`](/documentation/AppKit/NSColorPickerTouchBarItem/colorPicker(withIdentifier:))

Creates a bar item with the standard color picker icon.

[`textColorPicker(withIdentifier:)`](/documentation/AppKit/NSColorPickerTouchBarItem/textColorPicker(withIdentifier:))

Creates a bar item with the standard text color picker icon.

[`strokeColorPicker(withIdentifier:)`](/documentation/AppKit/NSColorPickerTouchBarItem/strokeColorPicker(withIdentifier:))

Creates a bar item with the standard stroke color picker icon.

[`colorPicker(withIdentifier:buttonImage:)`](/documentation/AppKit/NSColorPickerTouchBarItem/colorPicker(withIdentifier:buttonImage:))

Creates a color picker bar item using the supplied image as its icon.

### Configuring the color picker

[`colorList`](/documentation/AppKit/NSColorPickerTouchBarItem/colorList)

The list of colors displayed in the color picker.

[`allowedColorSpaces`](/documentation/AppKit/NSColorPickerTouchBarItem/allowedColorSpaces)

Controls the color spaces that the color picker can produce.

[`showsAlpha`](/documentation/AppKit/NSColorPickerTouchBarItem/showsAlpha)

A Boolean value that controls whether the color picker allows picking of colors with alpha values other than `1.0`.

[`isEnabled`](/documentation/AppKit/NSColorPickerTouchBarItem/isEnabled)

A Boolean value that determines whether the color picker is enabled.

### Obtaining the selected color

[`color`](/documentation/AppKit/NSColorPickerTouchBarItem/color)

The picker’s currently selected color.

[`target`](/documentation/AppKit/NSColorPickerTouchBarItem/target)

An object that is notified when a user interacts with the color picker.

[`action`](/documentation/AppKit/NSColorPickerTouchBarItem/action)

The selector on the target object that is invoked when a user interacts with the color picker.

### Configuring bar customization

[`customizationLabel`](/documentation/AppKit/NSColorPickerTouchBarItem/customizationLabel)

The user-visible string identifying this item during touch bar customization.



---

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)