Need help with changing dropdown list fill color change
Hi,
I am a serious beginner at JavaScript so have just been blundering about with finding situations and copy/pasting the solutions others have posted. I can't quite get this right because I thought I could merge a few different posts together to get an adequate solution to no avail.
I am creating a dropdown in which I have labeled "EH, H, M, L" which need to be fill color coded as Red, Orange, Yellow, Green, respectively. My issue is with the color orange, I can't seem to figure out how to make RGB values work in this script. I'm also not sure if there is an easier script to use given my ineptitude. Below is the validation script I have been using. Thanks for the help!
var f = this.getField("Dropdown18");
if(event.value == "EH"){
f.textColor = color.black;
f.strokeColor = color.red;
f.fillColor = color.red}
else if(event.value == "M"){
f.textColor = color.black;
f.strokeColor = color.yellow;
f.fillColor = color.yellow}
else if(event.value == "L"){
f.textColor = color.black;
f.strokeColor = color.green;
f.fillColor = color.green}
else if(event.value == "H"){
f.textColor = color.black;
f.strokeColor = color.["RGB", 255/255, 136/255, 0/255];
f.fillColor = color.["RGB", 255/255, 136/255, 0/255]}
