Let's assume the field where you enter the numbers is called "myField". Then, we would add the following to the Calculate event of the field where the background should change:
var mf = this.getField("myField") ;
if (mf.value > 0 && mf.value < 10) {
event.target.fillColor = color.yellow ;
} else {
if (mf.value >= 10 && mf.value < 20) {
event.target.fillColor = ["RGB", 1, 0, 0.2] ;
} else {
event.target.fillColor = ["T"] ;
}
}
and that should do it.
Note that there is no pre-defined orange color, and you'd have to get the correct color value array (I think the one I used is kind of an orange).
If you add the code to the calculate event of another field, you'd have to replace event.target
with this.getField("myOtherField")
(or whatever the field name is).