Carbon


Color2Index

Header: Quickdraw.h Carbon status: Supported

Obtains the index of the best available approximation for a given color in the color table of the current GDevice data structure. This function is used only by system software.

SInt32 Color2Index (
    const RGBColor *myColor
);
Parameter descriptions
myColor

A pointer to the RGB color value to be approximated.

function result

The index of the best approximation for the given color that is available in the color table of the current GDevice data structure. Note that Color2Index returns a long integer, in which the low-order word is the index value; the high-order word contains zeros.

DISCUSSION

You should not call Color2Index from within a custom search function (described in ColorSearchProcPtr).

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)