---
title: numberOfColorComponents
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscolorspace/numberofcolorcomponents
---

# numberOfColorComponents

The number of components, excluding alpha, the color space supports.

## Declaration

```swift
var numberOfColorComponents: Int { get }
```

## Discussion

Discussion This value is 0 if the color space isn’t based on float components.

## See Also

### Accessing Color Space Data and Attributes

- [cgColorSpace](appkit/nscolorspace/cgcolorspace.md)
- [colorSpaceModel](appkit/nscolorspace/colorspacemodel.md)
- [NSColorSpace.Model](appkit/nscolorspace/model.md)
- [colorSyncProfile](appkit/nscolorspace/colorsyncprofile.md)
- [iccProfileData](appkit/nscolorspace/iccprofiledata.md)
- [localizedName](appkit/nscolorspace/localizedname.md)
