Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Accessing Named Color Profile Values /


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);
A profile reference (page 3-63) to a named color space profile to obtain a named color index from.
A pointer to a Pascal string. You supply a color name string value for the color to obtain the color index for.
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.
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.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996