NSColorPanel provides a comprehensive color
selection interface that allows users to choose
colors using various color picking methods and modes.
The panel is typically used as a shared system-wide color
picker that can be integrated into applications
requiring color selection functionality. Key
features include: * Multiple color picker modes
(RGB, HSB, CMYK, grayscale, wheel, crayon, etc.) *
Customizable picker mask to enable/disable
specific color modes * Alpha transparency support
with optional alpha slider * Target-action pattern for
color change notifications * Continuous or discrete
update modes * Color list integration for predefined
color collections * Accessory view support for custom
interface extensions * Drag and drop color support
for easy color sharing * Automatic color space conversion
between picker modes The color panel operates as a
singleton shared instance and integrates seamlessly
with the application's event system. It supports both
programmatic color setting and interactive user
selection, with flexible notification mechanisms
to keep the application synchronized with color changes.
Color picker modes can be selectively enabled or
disabled using picker masks, allowing applications
to restrict the available color selection methods to match
their specific requirements or user interface
constraints.
Initiates a drag operation with the specified
color. aColor: The color to drag anEvent: The mouse
event that initiated the drag sourceView: The view
from which the drag originated Returns:
YES if the drag was successful,
NO otherwise
Drags aColor from sourceView
at the location give by the event anEvent (
[NSView -convertPoint:fromView:]
). The type declared into the pasteboard is NSColorPboardType
Sets which color picker modes are available in the
color panel. mask: Bitmask of NSColorPanel*ModeMask
constants specifying available modes
Determines color selection modes availible to
the the NSApplications colorPanel.
Sets the current color picker mode for new
color panel instances. mode: The color picker
mode constant (NSGrayModeColorPanel, etc.)
Specifies color panel's initial picker.
Attaches a color list to the color panel for the
color list picker mode. aColorList: The NSColorList
to make available in the color panel Adds a color
list to all of the color pickers of the receiver.
Detaches a color list from the color panel.
aColorList: The NSColorList to remove from the
color panel Removes the referenced color list
to all of the color pickers of the receiver.
Sets the action message sent when the color changes.
aSelector: The selector to invoke on the target
when color changes
Sets the NSColorPanl action method to
aSelector The action message is usally
send in
-setColor:
, when the picker is updated, when a new picker is
shown, when the alpha is changed or when one of
the color wells at the bottom is selected.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.