---
title: colorTable
framework: coregraphics
role: symbol
role_heading: Instance Property
path: coregraphics/cgcolorspace/colortable
---

# colorTable

The entries in the color table of an indexed color space.

## Declaration

```swift
var colorTable: [UInt8]? { get }
```

## Discussion

Discussion If the color space is an indexed color space, this array contains color component values for the colors in the color space, in the same format you use when creating an indexed color space with the init(indexedBaseSpace:last:colorTable:) initializer. If the color space is not an indexed color space, this property’s value is nil. To determine whether a color space is an indexed color space, read the model property.

## See Also

### Examining a Color Space

- [baseColorSpace](coregraphics/cgcolorspace/basecolorspace.md)
- [numberOfComponents](coregraphics/cgcolorspace/numberofcomponents.md)
- [model](coregraphics/cgcolorspace/model.md)
- [CGColorSpaceModel](coregraphics/cgcolorspacemodel.md)
- [copyICCData()](coregraphics/cgcolorspace/copyiccdata().md)
- [copyPropertyList()](coregraphics/cgcolorspace/copypropertylist().md)
- [iccData](coregraphics/cgcolorspace/iccdata.md)
- [name](coregraphics/cgcolorspace/name.md)
- [supportsOutput](coregraphics/cgcolorspace/supportsoutput.md)
- [isWideGamutRGB](coregraphics/cgcolorspace/iswidegamutrgb.md)
