ColorRequester()
Syntax
Color = ColorRequester([CurrentColor])Description
Opens the standard requester to choose a color. The chosen color is returned under a 24 bit number containing the red, green and blue value, as usual. To easily get each RGB component value, Red(), Green() and Blue() can be used. If the user cancel the requester, -1 is returned. The optional 'CurrentColor' parameter can be used to set the default color when the requester is opened.
Example:Color.l = ColorRequester() If Color > -1 a$ = "You have selected following color value:" + Chr(10) ; Chr(10) only needed a$ + "24 Bit value: " + Str(Color) + Chr(10) ; for line-feed a$ + "Red value: " + Str(Red(Color)) + Chr(10) a$ + "Green value: " + Str(Green(Color)) + Chr(10) a$ + "Blue value: " + Str(Blue(Color)) Else a$ = "The requester was canceled." EndIf MessageRequester("Information", a$, 0) End
Supported OS
All