Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 5 - Color Manager Reference /
Color Manager Functions / Managing Colors


Color2Index

Used by system software to obtain the index of the best available approximation for a given color in the color table of the current GDevice data structure.

pascal long Color2Index (const RGBColor *myColor);
myColor
A pointer to the RGB color value to be approximated.
DISCUSSION
The Color2Index function returns the index of the best approximation for a 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.

You should not call Color2Index from within a custom search function such as MySearchProc (page 5-17).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996