Click a swatch — the strip is an expanded NSColorWell; the dropper is NSColorSampler
Color Well
/ NSColorWell · ColorPicker /
also called color picker button, color swatch control, color chooser, color selector
“The little square showing the current color” is a color well — NSColorWell. Since macOS 13 it has three styles: minimal (just the swatch), default, and expanded — the modern one with a caret button attached. Clicking the expanded well opens a quick popover with a grid of swatches and an eyedropper; the caret opens the full color panel. The eyedropper that samples any pixel on screen is its own one-call API: NSColorSampler.
Anatomy — every part, named
- 1Color swatch
NSColorWell.color“The colored area itself” is the swatch — it always displays the well's current color and is the click target for the quick picker.
- 2Color-panel button
NSColorWell.Style.expanded“The little arrow segment next to the swatch” is the dedicated button the expanded style adds — it opens the full color panel.
- 3Quick color popover
NSColorWell.colorWellStyle“The grid of color squares that pops up” is the expanded style's quick picker — swatches for fast choices, without the full panel.
- 4Eyedropper (color sampler)
NSColorSampler“The eyedropper that picks a color from anywhere on screen” is the system color sampler — one call: NSColorSampler().show { color in … }.
Prompt — paste into your agent
Add a native macOS color well — NSColorWell (SwiftUI: ColorPicker). Use colorWellStyle = .expanded for the modern two-part control: clicking the swatch opens the quick color-grid popover with an eyedropper, and the caret button opens the full NSColorPanel. For a standalone screen-color eyedropper use NSColorSampler().show { color in … }.
In code
The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).
| AppKit | NSColorWell | |
| SwiftUI | ColorPicker | |
| AppKit | NSColorWell.colorWellStyle | .minimal / .default / .expanded (macOS 13+) |
| AppKit | NSColorWell.color | |
| AppKit | NSColorSampler | the standalone eyedropper |
| AppKit | NSColorWell.supportsAlpha |