Insert JavaScript below on the [EXIT] event for the target textField
if (this.rawValue == "R") {
this.fillColor = "255,0,0";
}
else if (this.rawValue == "G") {
this.fillColor = "0,255,0";
}
else if (this.rawValue == "B") {
this.fillColor = "0,0,255";
}
should work fine..