---
title: NSColorPanel
framework: appkit
role: symbol
role_heading: Class
path: appkit/nscolorpanel
---

# NSColorPanel

A standard user interface for selecting color in an app.

## Declaration

```swift
class NSColorPanel
```

## Overview

Overview NSColorPanel provides a number of standard color selection modes and, with the NSColorPickingDefault and NSColorPickingCustom protocols, allows an app to add its own color selection modes. It also allows the user to save swatches containing frequently used colors.

## Topics

### Obtaining the shared color panel

- [shared](appkit/nscolorpanel/shared.md)
- [sharedColorPanelExists](appkit/nscolorpanel/sharedcolorpanelexists.md)

### Setting color picker modes

- [setPickerMode(_:)](appkit/nscolorpanel/setpickermode(_:).md)
- [mode](appkit/nscolorpanel/mode-swift.property.md)
- [NSColorPanel.Mode](appkit/nscolorpanel/mode-swift.enum.md)
- [setPickerMask(_:)](appkit/nscolorpanel/setpickermask(_:).md)
- [NSColorPanel.Options](appkit/nscolorpanel/options.md)

### Configuring the color panel

- [accessoryView](appkit/nscolorpanel/accessoryview.md)
- [isContinuous](appkit/nscolorpanel/iscontinuous.md)
- [setAction(_:)](appkit/nscolorpanel/setaction(_:).md)
- [setTarget(_:)](appkit/nscolorpanel/settarget(_:).md)
- [showsAlpha](appkit/nscolorpanel/showsalpha.md)

### Managing color lists

- [attachColorList(_:)](appkit/nscolorpanel/attachcolorlist(_:).md)
- [detachColorList(_:)](appkit/nscolorpanel/detachcolorlist(_:).md)

### Setting color

- [dragColor(_:with:from:)](appkit/nscolorpanel/dragcolor(_:with:from:).md)
- [color](appkit/nscolorpanel/color.md)

### Supporting high dynamic range (HDR) colors

- [maximumLinearExposure](appkit/nscolorpanel/maximumlinearexposure.md)

### Getting transparency information

- [alpha](appkit/nscolorpanel/alpha.md)

### Responding to a color change

- [NSColorChanging](appkit/nscolorchanging.md)
- [colorDidChangeNotification](appkit/nscolorpanel/colordidchangenotification.md)

### Structures

- [NSColorPanel.ColorDidChangeMessage](appkit/nscolorpanel/colordidchangemessage.md)

## Relationships

### Inherits From

- [NSPanel](appkit/nspanel.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSMenuItemValidation](appkit/nsmenuitemvalidation.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [NSUserInterfaceValidations](appkit/nsuserinterfacevalidations.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Color Panels

- [NSColorPickingCustom](appkit/nscolorpickingcustom.md)
- [NSColorPickingDefault](appkit/nscolorpickingdefault.md)
- [NSColorPicker](appkit/nscolorpicker.md)
