Important: The information in this document is obsolete and should not be used for new development.
GetColor
Displays a standard color picker dialog box. However, your application should use thePickColorfunction, which is described in the preceding section, instead of this function. TheGetColorfunction was designed for use for version 1.0 of the Color Picker Package and is still supported for backward compatibility.
pascal Boolean GetColor ( Point where, Str255 prompt, RGBColor *inColor, RGBColor *outColor);
where- A point defining the location of the upper-left corner of the dialog box. If you set this parameter to (0,0), the dialog box is centered horizontally on the main screen, with one-third of the empty space above the box and two-thirds below, regardless of the screen size. If you set this parameter to (-1,-1), the
GetColorfunction displays the dialog box on the screen supporting the greatest pixel depth.prompt- Text for prompting the user to choose a color. This string is displayed in the upper-left corner of the dialog box.
inColor- A pointer to a Color QuickDraw
RGBColorstructure describing the original color, which the user may want for comparison.outColor- A pointer to a Color QuickDraw
RGBColorstructure describing the new color. This is set to the last color that the user picked before clicking OK. On entry, theoutColorparameter is treated as undefined, so the output color sample initially matches the input. Although the color being picked may vary widely, the input color sample remains fixed, and clicking the input sample resets the output color sample to match it.DISCUSSION
TheGetColorfunction displays a standard color picker dialog box onscreen. TheGetColorfunction returnstrueand removes the dialog box when the user clicks the OK button;GetColorreturnsfalseand removes the dialog box when the user clicks the Cancel button.SPECIAL CONSIDERATIONS
TheGetColorfunction does not support ColorSync 1.0 color matching; however, thePickColorfunction does.