<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColorPicker/init(pickerMask:colorPanel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSColorPicker(im)initWithPickerMask:colorPanel:"
  },
  "title" : "init(pickerMask:colorPanel:)"
}
-->

# init(pickerMask:colorPanel:)

Initializes the color picker with the specified color panel and color picker mode mask.

```
@MainActor init?(pickerMask mask: Int, colorPanel owningColorPanel: NSColorPanel)
```

## Parameters

`mask`

The color picker mask.

`owningColorPanel`

The `NSColorPanel` that owns the color picker. This value is cached so it can be accessed using the [`colorPanel`](/documentation/AppKit/NSColorPicker/colorPanel) property.

## Return Value

An initialized color picker object.

## Discussion

Override this method to respond to the values in `mask` or do other custom initialization. If you override this method in a subclass, you should forward the message to `super` as part of the implementation.

## See Also

[`colorPanel`](/documentation/AppKit/NSColorPicker/colorPanel)

The color panel instance that owns the color picker.

[`-  initWithPickerMask:colorPanel:`](/documentation/AppKit/NSColorPickingDefault/init(pickerMask:colorPanel:))

Initializes the receiver with a given color panel and its mode.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)