Error getting tags :
error 404Error getting tags :
error 404 answer color | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
answer color
Basics
Expander triangle
Type
Command
Syntax
answer color [with startingColor]
Introduced
1.1
Changed
1.1.1
Environment
Desktop,Web
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Displays the operating system's standard color-selection dialog box.
Examples

answer color
if theItem is "Custom Color..." then answer color
answer color with "#FF0033"
answer color with "AliceBlue"

Additional Comments
Expander triangle

Use the answer color command to select a custom color.

Parameters:

The startingColor is a color reference consisting of one of the following:

* a standard color name

* three comma-separated integers between zero and 255, specifying the level of each of red, green, and blue

* an HTML-style color consisting of a hash mark (#) followed by three hexadecimal numbers, one for each of red, green, and blue.

Comments:

The answer color command displays a dialog box where the user can select a color. (This dialog box is displayed by the operating system, not by Revolution.)

The color the user chooses is placed in the it variable. If the user cancels the dialog, the it variable is set to empty, and the result function returns "Cancel".

If you specify a startingColor, the dialog box displays that color by default.

The color is returned in the form of three comma-separated integers between zero and 255, specifying the level of each of red, green, and blue. This format can be used directly to set any color property.

Changes to Revolution:

The option to specify a startingColor was introduced in version 1.1.1. In previous versions, the dialog box displayed white by default.

User Comments
Expander triangle