Change color to hex values in javascript
Hi there,
I am using this script within my custom keystroke script:
// Custom Keystroke script for dropdown
(function () {
if (!event.willCommit) {
exp_val = event.changeEx;
// Get a reference to the text field
var f = getField("DD39");
// Set the stroke color of the text field based on the dropdown selection
switch (exp_val) {
case "0" :
f.fillColor = color.green;
break;
case "1" :
f.fillColor = color.blue;
break;
case "2" :
f.fillColor = color.yellow;
break;
case "3" :
f.fillColor = color.red;
break;
default :
f.fillColor = color.white;
break;
}
}
})();
However I would really like to use custom color values, rather than the defaults. What is the syntax? I've tried a few things but nothing works.
Thanks
Amanda
