<!--
{
  "availability" : [
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColorPickerTouchBarItem/allowedColorSpaces",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSColorPickerTouchBarItem(py)allowedColorSpaces"
  },
  "title" : "allowedColorSpaces"
}
-->

# allowedColorSpaces

Controls the color spaces that the color picker can produce.

```
var allowedColorSpaces: [NSColorSpace]? { get set }
```

## Discussion

If a selected color is outside the allowed color spaces, the picker converts it to the first color space in the array.

Set the value of this property to `nil` to allow all color spaces. An empty array is an invalid value.

---

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)