OK now I understand. You will have to setup your field with the appearance the way you want (i.e. Linear toBottom) with white to white before you run your script. This will give the same appearance as a normal field but it will put the neccessary nodes in the XDP to allow you to manipulate them. Once you do this you will need three commands to complete your change.
1. To set the style of the appearance:
TextField1.ui.textEdit.border.fill.linear.type = "to Bottom";
2. Set the color that you are fading to:
TextField1.ui.textEdit.border.fill.linear.color.value = "0,0,255";
3. Set the colro of the field that you are starting from:
TextField1.ui.textEdit.border.fill.color.value = "255,0,0";
Lastly you will need to put fous on the field to have your changes applied:
xfa.host.setFocus("TextField1");