---
title: "init(pickerMask:colorPanel:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nscolorpicker/init(pickermask:colorpanel:)"
---

# init(pickerMask:colorPanel:)

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

## Declaration

```swift
@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 doc://com.apple.appkit/documentation/AppKit/NSColorPicker/colorPanel property.

## Return Value

Return Value An initialized color picker object.

## Discussion

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

### Related Documentation

- [colorPanel](appkit/nscolorpicker/colorpanel.md)
- [init(pickerMask:colorPanel:)](appkit/nscolorpickingdefault/init(pickermask:colorpanel:).md)
