Important: The information in this document is obsolete and should not be used for new development.
CMGetNamedColorIndex
Obtains a named color index for a specific color name from a named color space profile.
pascal CMError CMGetNamedColorIndex ( CMProfileRef prof, StringPtr name, unsigned long *index);
prof
- A profile reference (page 3-63) to a named color space profile to obtain a named color index from.
name
- A pointer to a Pascal string. You supply a color name string value for the color to obtain the color index for.
index
- A pointer to an index value. On output, an index value for a named color.
- function result
- A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
Based on the passed color name, the CMGetNamedColorIndex function does a lookup into the named color tag and, if the name is found in the tag, returns the index. Otherwise, CMGetNamedColorIndex returns an error code.