---
title: NSColorWell
framework: appkit
role: symbol
role_heading: Class
path: appkit/nscolorwell
---

# NSColorWell

A control that displays a color value and lets the user change that color value.

## Declaration

```swift
class NSColorWell
```

## Overview

Overview An NSColorWell object lets people select colors from your interface. Incorporate this type of control if your app supports custom color selection. For example, a drawing app might include a color well to let someone choose the color to use when drawing. A color well control displays the currently selected color, and interactions with the color well display interfaces for selecting new colors. When you create a color well programmatically or in Interface Builder, specify the appearance and interaction style you want. The color well supports color selection using a color picker popover or the system NSColorPanel object. When someone selects a new color in one of these interfaces, the color well updates its selected color to match. You can also provide your own color selection process using a custom action and update the color yourself.

## Topics

### Creating a color well

- [init(style:)](appkit/nscolorwell/init(style:).md)

### Managing the selected color

- [color](appkit/nscolorwell/color.md)
- [takeColorFrom(_:)](appkit/nscolorwell/takecolorfrom(_:).md)
- [supportsAlpha](appkit/nscolorwell/supportsalpha.md)

### Supporting high dynamic range (HDR) colors

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

### Configuring the appearance

- [colorWellStyle](appkit/nscolorwell/colorwellstyle.md)
- [NSColorWell.Style](appkit/nscolorwell/style.md)
- [image](appkit/nscolorwell/image.md)
- [isBordered](appkit/nscolorwell/isbordered.md)

### Activating and deactivating color wells

- [activate(_:)](appkit/nscolorwell/activate(_:).md)
- [isActive](appkit/nscolorwell/isactive.md)
- [deactivate()](appkit/nscolorwell/deactivate().md)

### Drawing color wells

- [drawWell(inside:)](appkit/nscolorwell/drawwell(inside:).md)

### Customizing the color selection behavior

- [pulldownAction](appkit/nscolorwell/pulldownaction.md)
- [pulldownTarget](appkit/nscolorwell/pulldowntarget.md)

## Relationships

### Inherits From

- [NSControl](appkit/nscontrol.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)
- [NSDraggingDestination](appkit/nsdraggingdestination.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Color Selection

- [NSColorPicker](appkit/nscolorpicker.md)
- [NSColorPickerTouchBarItem](appkit/nscolorpickertouchbaritem.md)
