---
title: allowedColorSpaces
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscolorpickertouchbaritem/allowedcolorspaces
---

# allowedColorSpaces

Controls the color spaces that the color picker can produce.

## Declaration

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

## Discussion

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.

## See Also

### Configuring the color picker

- [colorList](appkit/nscolorpickertouchbaritem/colorlist.md)
- [showsAlpha](appkit/nscolorpickertouchbaritem/showsalpha.md)
- [isEnabled](appkit/nscolorpickertouchbaritem/isenabled.md)
