Important: The information in this document is obsolete and should not be used for new development.
ColorSpec
When creating aPixMap
record (described on page 4-37) for an indexed device, Color QuickDraw creates aColorTable
record that defines the best colors available for the pixel image on that graphics device. The Color Manager also stores aColorTable
record for the currently available colors in the graphics device's CLUT.One of the fields in a
ColorTable
record requires a value of typecSpecArray
, which is defined as an array ofColorSpec
records. Typically, your application never needs to createColorTable
records orColorSpec
records. For completeness, the data structure of typeColorSpec
is shown here, and the data structure of typeColorTable
is shown next.
TYPE cSpecArray: ARRAY[0..0] Of ColorSpec; ColorSpec = RECORD value: Integer; {index or other value} rgb: RGBColor; {true color} END;
Field Description
value
- The pixel value assigned by Color QuickDraw for the color specified in the
rgb
field of this record. Color QuickDraw assigns a pixel value based on the capabilities of the user's screen. For indexed devices, the pixel value is an index number assigned by the Color Manager to the closest color available on the indexed device; for direct devices, this value expresses the best available red, green, and blue values for the color on the direct device.rgb
- An
RGBColor
record (described in the previous section) that fully specifies the color whose approximation Color QuickDraw specifies in thevalue
field.