uisetcolor - Open standard dialog box for setting object's ColorSpec

Syntax

c = uisetcolor
c = uisetcolor([r g b])
c = uisetcolor(h)
c = uisetcolor(...,'dialogTitle')

Description

c = uisetcolor displays a modal color selection dialog appropriate to the platform, and returns the color selected by the user. The dialog box is initialized to white.

c = uisetcolor([r g b]) displays a dialog box initialized to the specified color, and returns the color selected by the user. r, g, and b must be values between 0 and 1.

c = uisetcolor(h) displays a dialog box initialized to the color of the object specified by handle h, returns the color selected by the user, and applies it to the object. h must be the handle to an object containing a color property.

c = uisetcolor(...,'dialogTitle') displays a dialog box with the specified title.

If the user presses Cancel from the dialog box, or if any error occurs, the output value is set to the input RGB triple, if provided; otherwise, it is set to 0.

See Also

ColorSpec

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS