Carbon


CMGetNamedColorIndex

Header: CMApplication.h Carbon status: Supported

Obtains a named color index for a specific color name from a named color space profile.

CMError CMGetNamedColorIndex (
    CMProfileRef prof, 
    StringPtr name, 
    UInt32 *index
);
Parameter descriptions
prof

A profile reference of type CMProfileRef 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 return, an index value for a named color.

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.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when ColorSync 2.1 or later is present.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)