version 11
Select RGB Color ({defaultColor}{; }{message}) Longint
Parameter | Type | Description | |
defaultColor | Longint | Preselected RGB color | |
message | Alpha 255 | Title of selection window | |
Function result | Longint | RGB color |
Description
The Select RGB Color command displays the system color selection window and returns the RGB value of the color selected by the user.
The system color selection window appears as follows:
Windows Macintosh
The optional defaultColor parameter can be used to preselect a color in the window. This parameter can be used, for example, to restore by default the last color set by the user. Pass an RGB-format color value in this parameter (for more information, refer to the description of the SET RGB COLORS command). You can use one of the constants in the "SET RGB COLORS" theme.
If the defaultColor parameter is omitted or if you pass 0, the color black is selected when the dialog box is opened.
The optional message parameter can be used to customize the title of the system window. By default, if this parameter is omitted, the title "Colors" is displayed.
If the user validates the dialog box, the command returns the value of the color selected in RGB format and the system variable OK is set to 1. If the user cancels the dialog box, the command returns -1 and the system variable OK is set to 0.
Note: This command must not be executed on the server machine nor within a Web process.
See Also
System Variables or Sets
If the user validates the dialog box, the system variable OK is set to 1; otherwise, it is set to 0.