Extensions Reference
Extensions Reference > exDialogs
dlgColourDialog
int dlgColourDialog(int RGBDefault);
Displays a colour selection dialog
The DLGCOLOURDIALOG function displays a standard Windows colour selection dialog for the user to pick a colour. This function is available via an alternative American (wrong!) spelling of DLGCOLORDIALOG.
Self-assignment to a variable is legal.
Parameters
RGBDefault
The RGB colour to select by default when the dialog opens
Return Value
The RGB colour selected by the user, packed into a Shiny type INT. If the user Cancels the dialog, the RGB colour supplied as the RGBDefault parameter is returned.
Example Code
// Open the dialog with black selected, store colour in iRGBSel
iRGBSel = dlgColourDialog(RGB(0, 0, 0));
// Open the dialog with self-assignment. iRGBSel will remain the
// same if Cancel is clicked, or will receive the new RGB if OK is clicked.
iRGBSel = dlgColourDialog(iRGBSel);