Correction, this was the code I was using: if (event.value=="UL") event.target.fillColor = color.red; else if (event.value=="ML") event.target.fillColor = color.green; else if (event.value=="IL") event.target.fillColor = color.blue; The other code did not work at all.