Copies the entries in the color table of an indexed color space.
SDKs
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Graphics
Declaration
void CGColorSpaceGetColorTable(CGColor Space Ref space, uint8 _t *table);
Parameters
space
A color space object for an indexed color space.
table
The array pointed to by table should be at least as large as the number of entries in the color table. On output, the array contains the table data in the same format as that passed to
CGColor
.Space Create Indexed
Discussion
This function does nothing if the color space is not an indexed color space. To determine whether a color space is an indexed color space, call the function CGColor
.