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

# colorNameComponent

The name of the color.

```
var colorNameComponent: NSColor.Name { get }
```

## Discussion

Access this property only for colors in the [`named`](/documentation/AppKit/NSColorSpaceName/named) color space. Accessing it for other color types raises an exception.

## See Also

[`+  colorWithCatalogName:colorName:`](/documentation/AppKit/NSColor/init(catalogName:colorName:))

Creates a color object using the specified asset catalog and color names.



---

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)