RequestColor ( [red][,green][,blue] )
Parameters
|
red (optional) - initial red component, 0 to 255; 255 (default) green (optional) - initial green component, 0 to 255; 255 (default) blue (optional) - initial blue component, 0 to 255; 255 (default) |
Description
|
Opens the standard Windows colour picker; returns 1 if the user chose a colour, 0 on cancel. Requires Extended language mode. The chosen colour is not returned directly - read it with RequestedRed, RequestedGreen and RequestedBlue after the call returns 1. On cancel those values keep whatever they held before, so always check the result first: If RequestColor(200,80,80) SetPanelColor swatch,RequestedRed(),RequestedGreen(),RequestedBlue() EndIf The red, green and blue parameters preselect a starting colour (out-of-range values are clamped) - pass the colour currently in use so the user can tweak rather than rebuild it. The dialog opens fully expanded with the custom-colour grid visible, and custom colours the user mixes are remembered for the rest of the program run. Like the other requesters it is modal, owned by your active GUI window, and posts begin/end-modal events ($2004/$2005) to the shared event queue. See also: RequestedRed, RequestedGreen, RequestedBlue, RequestFont, SetPanelColor, SetTextAreaColor. |
Index