Color Wells

Color wells are the user interface that Cocoa provides for selecting and displaying a color. A color well displays a swatch representing the current color settings, and when clicked, the color panel is presented to the user. Most color wells are configured to show a border around them, which indicates if the color well is the active color well in the application, as shown in Figure 17.3. Color wells can be the target of a color dragging operation as well as an originator.

Figure 17.3. The possible NSColorWell visual states.

NSColorWell Class

NSColorWell, a subclass of NSControl, is the implementation class of the color well user ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.