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 thePickColor
function, which is described in the preceding section, instead of this function. TheGetColor
function 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
GetColor
function 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
RGBColor
structure describing the original color, which the user may want for comparison.outColor
- A pointer to a Color QuickDraw
RGBColor
structure describing the new color. This is set to the last color that the user picked before clicking OK. On entry, theoutColor
parameter 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
TheGetColor
function displays a standard color picker dialog box onscreen. TheGetColor
function returnstrue
and removes the dialog box when the user clicks the OK button;GetColor
returnsfalse
and removes the dialog box when the user clicks the Cancel button.SPECIAL CONSIDERATIONS
TheGetColor
function does not support ColorSync 1.0 color matching; however, thePickColor
function does.