Set an object's ColorSpec
from a dialog box interactively
Syntax
c = uisetcolor(h_or_c, 'DialogTitle');
Description
uisetcolor
displays a dialog box for the user to fill in, then applies the selected color to the appropriate property of the graphics object identified by the first argument.
h_or_c can be either a handle to a graphics object or an RGB triple. If you specify a handle, it must specify a graphics object that have a Color
property. If you specify a color, it must be a valid RGB triple (e.g., [1 0 0] for red). The color specified is used to initialize the dialog box. If no initial RGB is specified, the dialog box initializes the color to black.
DialogTitle
is a string that is used as the title of the dialog box.
c
is the RGB value selected by the user. If the user presses Cancel from the dialog box, or if any error occurs, c
is set to the input RGB triple, if provided; otherwise, it is set to 0.
See Also
ColorSpec
[ Previous | Help Desk | Next ]