The Color Input object allows the user to select a color.
The Color Input object corresponds to the <input type="color"> HTML tag.
IMPORTANT: This object do not work on Internet Explorer. Use any other WebBrowser to test it.
To create a Color Input object, use the mouse to draw a rectangle where you want the field to appear. The Color Input properties can be accessed from the Properties Panel, allowing you to define the appearance and behaviour.
- id: use this property to set a unique name for your Color Input. It will allow you later to modify its properties programatically.
- initial-value: add here some predefined color in html format (#445566). The Color Input will be prefilled with that value.
- property-name: this is important if you want to send the data from a Form with a Text Input to a server. The server script will get the value associated to this property name. See Form object for more info.
- variable: if you want to store the Color Input data into a variable to keep track of its content, just add the variable name using brackets into the variable property (ie: [color]). For more information see Understanding Actions and Variables.
At runtime, the variable will contain whatever has been typed into the field. You can modify the contents of the Color Input object by manipulating the variable using a simple Action Command. For example:
SetVar "[mycolor]" "#ff0000"
Similarly, you can clear the contents of the Color Input object like this:
SetVar "[mycolor]" ""