Carbon


CMMGetNamedColorIndex

Header: CMMComponent.h Carbon status: Unsupported

Handles the kCMMGetNamedColorIndex request by returning a named color index from a named color space profile for a specific color name.

CMError CMMGetNamedColorIndex (
    CMMComponentInst cmm, 
    CMProfileRef prof, 
    StringPtr name, 
    UInt32 *index
);
Parameter descriptions
cmm

A handle to your CMM’s storage for the instance of your component associated with the calling application or device driver.

prof

A profile reference of type CMProfileRef to a named color space profile.

name

A pointer to a Pascal color name string that identifies the named color to return the index value for.

index

A pointer to a value of type unsigned long. On output, it specifies the index value for the named color specified by name.

DISCUSSION

A CMM may respond to the kCMMGetNamedColorIndex request code, but it is not required to do so. Most CMMs can rely on the default CMM to handle this request code adequately. The ColorSync Manager sends this request code to your CMM on behalf of an application or device driver that called the CMMGetNamedColorIndex function. The ColorSync Manager dispatches this request to the Component Manager, which calls your CMM to service the request. A CMM that handles the kCMMGetNamedColorIndex request code typically responds by calling a CMM-defined function (for example, CMMGetNamedColorIndex).

Based on the passed color name, the CMMGetNamedColorIndex function does a lookup into the named color tag of the profile whose reference is passed in the prof parameter and, if the name is found in the tag, returns the index. Otherwise, CMMGetNamedColorIndex returns an error code.

CARBON NOTES

CMMGetNamedColorIndex is an API to CMMs. Use CMGetNamedColorIndex instead. Application developers should avoid calling CMMs directly, since they may or may not support a given API.


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