# `GSGlyph.color`

*Instance Property*

The color label used to organize the glyph, or `nil` if no color label is assigned.

## Declaration

```swift
var color: NSColor? { get set }
```

```objc
@property (nonatomic, retain) NSColor * color;
```

[See also `color` in the Python API](https://docu.glyphsapp.com/#GSGlyph.color)

```python
pyobjc_instanceMethods.color() -> NSColor
pyobjc_instanceMethods.setColor_(color: NSColor)
```

## Discussion

For a standard color label, this resolves [`GSGlyph.colorIndex`](/Core/GlyphsCore/GSGlyph/colorIndex) using the current label color palette. Setting a color stores a custom color label and clears [`GSGlyph.colorIndex`](/Core/GlyphsCore/GSGlyph/colorIndex).

## See Also

### Metadata

- [`GSGlyph.note`](/Core/GlyphsCore/GSGlyph/note) — A free-form note associated with the glyph.
- [`GSGlyph.colorIndex`](/Core/GlyphsCore/GSGlyph/colorIndex) — A standard color label, or [`GSLabelColor.GSLabelColorNoColor`](/Core/GlyphsCore/GSLabelColor/GSLabelColorNoColor) if the glyph has a custom color label or no color label.

