# `GSPalettes`

*Class*

This class defines the palettes object which conforms to the GSItemProtocol and NSCopying.

## Declaration

```swift
class GSPalettes
```

```objc
@interface GSPalettes : NSObject
```

```python
class GSPalettes(NSObject)
```

## Topics

### Instance Properties

- [`GSPalettes.colorNames`](/Core/GlyphsCore/GSPalettes/colorNames)
- [`GSPalettes.countOfColors`](/Core/GlyphsCore/GSPalettes/countOfColors) — The number of colors.
- [`GSPalettes.countOfPalettes`](/Core/GlyphsCore/GSPalettes/countOfPalettes) — The number of palettes.
- [`GSPalettes.palettes`](/Core/GlyphsCore/GSPalettes/palettes)

### Instance Methods

- [`GSPalettes addColor:`](/Core/GlyphsCore/GSPalettes/addColor:) — Adds a color to the palettes.
- [`GSPalettes addAttribute:toPalette:`](/Core/GlyphsCore/GSPalettes/addAttribute:toPalette:) — Adds an attribute to the specified palette index.
- [`GSPalettes addPalette:`](/Core/GlyphsCore/GSPalettes/addPalette:) — Adds a palette to the palettes.
- [`GSPalettes colorForPalette:forColor:`](/Core/GlyphsCore/GSPalettes/colorForPalette:forColor:) — Returns the color for the specified palette and color indices.
- [`GSPalettes colorsForPalette:`](/Core/GlyphsCore/GSPalettes/colorsForPalette:) — Returns the colors for the specified palette index.
- [`GSPalettes displayNameForPalette:`](/Core/GlyphsCore/GSPalettes/displayNameForPalette:) — Returns the display name for the specified palette index.
- [`GSPalettes hasAttribute:inPalette:`](/Core/GlyphsCore/GSPalettes/hasAttribute:inPalette:) — Checks if the specified palette index has the given attribute.
- [`GSPalettes indexOfPaletteWithAttribute:`](/Core/GlyphsCore/GSPalettes/indexOfPaletteWithAttribute:) — Returns `NSNotFound` when no palette has the given attribute.
- [`GSPalettes nameForColor:`](/Core/GlyphsCore/GSPalettes/nameForColor:) — Returns the name for the specified color index.
- [`GSPalettes nameForPalette:`](/Core/GlyphsCore/GSPalettes/nameForPalette:) — Returns the name for the specified palette index.
- [`GSPalettes paletteAtIndex:`](/Core/GlyphsCore/GSPalettes/paletteAtIndex:) — Returns the palette at the specified index.
- [`GSPalettes removeAttribute:fromPalette:`](/Core/GlyphsCore/GSPalettes/removeAttribute:fromPalette:) — Removes an attribute from the specified palette index.
- [`GSPalettes removeColorAtIndex:`](/Core/GlyphsCore/GSPalettes/removeColorAtIndex:) — Removes the color at the specified index.
- [`GSPalettes removeColorsAtIndexes:`](/Core/GlyphsCore/GSPalettes/removeColorsAtIndexes:) — Removes the colors at the specified indexes.
- [`GSPalettes removePaletteAtIndex:`](/Core/GlyphsCore/GSPalettes/removePaletteAtIndex:) — Removes the palette at the specified index.
- [`GSPalettes setColor:forPalette:forColor:`](/Core/GlyphsCore/GSPalettes/setColor:forPalette:forColor:) — Sets the color for the specified palette and color indices.
- [`GSPalettes setName:forColor:`](/Core/GlyphsCore/GSPalettes/setName:forColor:) — Sets the name for the specified color index.
- [`GSPalettes setName:forPalette:`](/Core/GlyphsCore/GSPalettes/setName:forPalette:) — Sets the name for the specified palette index.
- [`GSPalettes transferableRepresentation`](/Core/GlyphsCore/GSPalettes/transferableRepresentation) — Returns the same structure as `-propertyListValueFormat:` with the current format, but colors are represented as `GSPaletteColor` objects.

## Relationships

### Inherits From

- `NSObject`

### Conforms To

- [`GSItemProtocol`](/Core/GlyphsCore/GSItemProtocol)
- `NSCopying`

