Construct the dialog.
Construct the dialog.
Set the initial color to display in the dialog. Use colors from the preset color list or a web style hex color.
Show the dialog.
Get the dialog result. This varies on the type of dialog used and will reflect the overall result expected of each dialog.
Remove any leading or trailing braces.
Show the dialog.
auto dialog = new ColorDialog("Select a color") .setInitialColor(Color.white) .show(); string color = dialog.getResult();
Result: The web style hex color selected.
Pops up a dialog box for the user to select a color.