MATLAB Functions | Help Desk |
uisetcolor
Interactively set an object'sColorSpec
from a dialog box (MS-Windows and Mac only)
c = uisetcolor(h_or_c, 'dialogTitle')
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 supports color. 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.
ColorSpec