Search...
value
Sets or gets an element's color value.
Description
The value
property supports basic named colors, RGB, and hexadecimal code formats.
Note: Changing an element's
value
in code does not trigger anonChange()
event.
Type:
stringRead & Write
Was this helpful?
Get an element's value
Copy Code
1let value = $w("#myColorPicker").value; // "red"
Set an element's value (RGB)
Copy Code
1$w("#myColorPicker").value = "rgb(225,0,0)";
Set an element's value (Hexadecimal)
Copy Code
1$w("#myColorPicker").value = "#FF00FF";