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 1 - Palette Manager Reference /
Constants and Data Types


The Color Information Structure

Each color information structure in a palette comprises an RGB color value, information describing how the color is to be used, a tolerance value for colors that need only be approximated, and private fields. You should not create and modify the public fields directly; instead, use Palette Manager functions such as SetEntryColor and SetEntryUsage.

The ColorInfo data type defines a color information structure.

struct ColorInfo {
   RGBColor ciRGB;         / *true RGB values */
   short ciUsage;          / *color usage */
   short ciTolerance;      / *tolerance value */
   short ciDataFields[3];  / *private fields */
};
typedef struct ColorInfo ColorInfo;
Field Description
ciRGB
An RGB color value, which is defined by the RGBColor structure (see the chapter "Color QuickDraw" in Inside Macintosh: Imaging With QuickDraw). It contains three fields that contain integer values for defining, respectively, the red, green, and blue values of the color.
ciUsage
One or more of the usage constants, specifying how this entry is to be used. The ciUsage field can contain any of the usage constants, which are listed in "Usage Constants" (page 1-3).
ciTolerance
An integer expressing the range in RGB space within which the red, green, and blue values must fall to satisfy this entry. A tolerance value of $0000 means that only an exact match is acceptable. Values of $0xxx other than $0000 are reserved and should not be used in applications.
ciDataFields
Private fields.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996