SelectColor Function

Displays the standard Color picker, allowing the user to choose a color.

Syntax
result = SelectColor( col, prompt )

Parameters
col | ByRef Color | Color passed to SelectColor and the color the user selects. Note usage of ByRef in the parameter list.
prompt | String | Prompt to be displayed in the Color PIcker. Shown only on Macintosh.

Return Value
Result | Boolean | Returns True if the user clicks OK; False if the user cancels.

# Notes

You control the default choice of color displayed by the Color Picker by passing a value of col to SelectColor. If col is not assigned a value, black is used as the default color. The color that the user chooses is returned in col. If the user clicks Cancel without making a choice, result is set to False; otherwise it is set to True.

# Example

The following example allows the user to select a color that will be used as the fillcolor in a Rectangle control.

Dim c as Color
Dim b as Boolean
c= CMY(.35,.9,.6) //choose the default color shown in color picker
b=SelectColor(c,"Select a Color")
Rectangle1.FillColor=c

# See Also

Color data type; CMY, RGB, HSV functions; &c literal.