Initializes the receiver with a given color panel and its mode.
- macOS 10.0+
A mask indicating the various color picker modes supported by the color panel. This is determined by the argument to the
set. If it has not been set,
NSColor. If your color picker supports any additional modes, you should invoke the
Panel All Modes Mask
setmethod when your application initializes to notify the
NSColorclass. The standard mode constants are defined in Choosing the Color Pickers in a Color Panel.
The color panel than owns the receiver.
If your color picker responds to any of the modes represented in
panel, it should perform its initialization and return an initialized color picker. Color pickers that do so have their buttons inserted in the color panel and continue to receive messages from the panel as the user manipulates it. If the color picker doesn’t respond to any of the modes represented in
panel, it should do nothing and return
This method is sent by the
NSColor to all implementors of the color-picking protocols when the application’s color panel is first initialized. In order for your color picker to receive this message, it must have a bundle in your application’s “ColorPickers” directory (described in Adding Custom Color Pickers to a Color Panel).
This method should examine the mask and determine whether it supports any of the modes included there. You may also check the value in
mask to enable or disable any subpickers or optional controls implemented by your color picker. Your color picker may also retain
owning in an instance variable for future communication with the color panel.
This method is provided to initialize your color picker; however, much of a color picker’s initialization may be done lazily through the