Important: The information in this document is obsolete and should not be used for new development.
ColorSpec
When creating aPixMaprecord (described on page 4-37) for an indexed device, Color QuickDraw creates aColorTablerecord that defines the best colors available for the pixel image on that graphics device. The Color Manager also stores aColorTablerecord for the currently available colors in the graphics device's CLUT.One of the fields in a
ColorTablerecord requires a value of typecSpecArray, which is defined as an array ofColorSpecrecords. Typically, your application never needs to createColorTablerecords orColorSpecrecords. For completeness, the data structure of typeColorSpecis shown here, and the data structure of typeColorTableis 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
rgbfield 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
RGBColorrecord (described in the previous section) that fully specifies the color whose approximation Color QuickDraw specifies in thevaluefield.