<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColorSpaceName",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSColorSpaceName"
  },
  "title" : "NSColorSpaceName"
}
-->

# NSColorSpaceName

Constants that specify color space names.

```
struct NSColorSpaceName
```

## Topics

### Color Space Names

[`static let calibratedRGB: NSColorSpaceName`](/documentation/AppKit/NSColorSpaceName/calibratedRGB)

Calibrated color space with red, green, blue, and alpha components.

[`static let calibratedWhite: NSColorSpaceName`](/documentation/AppKit/NSColorSpaceName/calibratedWhite)

Calibrated color space with white and alpha components (pure white is 1.0)

[`static let custom: NSColorSpaceName`](/documentation/AppKit/NSColorSpaceName/custom)

Custom `NSColorSpace` object and floating-point components describing a color in that space

[`static let deviceCMYK: NSColorSpaceName`](/documentation/AppKit/NSColorSpaceName/deviceCMYK)

Device-dependent color space with cyan, magenta, yellow, black, and alpha components

[`static let deviceRGB: NSColorSpaceName`](/documentation/AppKit/NSColorSpaceName/deviceRGB)

Device-dependent color space with red, green, blue, and alpha components.

[`static let deviceWhite: NSColorSpaceName`](/documentation/AppKit/NSColorSpaceName/deviceWhite)

Device-dependent color space with white and alpha components (pure white is 1.0)

[`static let named: NSColorSpaceName`](/documentation/AppKit/NSColorSpaceName/named)

Catalog name and color name components

[`static let pattern: NSColorSpaceName`](/documentation/AppKit/NSColorSpaceName/pattern)

Pattern image (tiled)

### Getting the Number of Components

[`var numberOfColorComponents: Int`](/documentation/AppKit/NSColorSpaceName/numberOfColorComponents)

Returns the number of color components in the specified color space.

### Initializers

[`init(rawValue: String)`](/documentation/AppKit/NSColorSpaceName/init(rawValue:))

Creates a new instance with the specified raw value.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

---

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)