Livecycle common scripting tasks.106.3.1 Changing the background colors of fields, fillable areas, and subforms
You set the subform and the text field background colors by using the fillColor method. For example, the following line is the script for the subform:
Subform1.fillColor =”17,136,255″;
Subform1.Name.fillColor =”102,179,255″;
Subform1.Address.fillColor = “102,179,255″;
Subform1.City.fillColor =”102,179,255″;
Subform1.State.fillColor =”102,179,255″;
Subform1.ZipCode.fillColor = “102,179,255″;
Subform1.Country.fillColor = “102,179,255″;
When setting the background color or the fillable area for each text field, your scripts must access properties that require a reference syntax expression that includes the number sign (#). Because JavaScript does not interpret the number sign (#) properly in reference syntax expressions, the script uses the resolveNode method to resolve the expression.
xfa.resolveNode(“Subform1.Name.ui.#textEdit.border.fill.color”).value = “153,204,255″;
xfa.resolveNode(“Subform1.Address.ui.#textEdit.border.fill.color”).value = “153,204,255″;
xfa.resolveNode(“Subform1.City.ui.#textEdit.border.fill.color”).value = “153,204,255″;
xfa.resolveNode(“Subform1.State.ui.#textEdit.border.fill.color”).value = “153,204,255″;
xfa.resolveNode(“Subform1.ZipCode.ui.#textEdit.border.fill.color”).value = “153,204,255″;
xfa.resolveNode(“Subform1.Country.ui.#textEdit.border.fill.color”).value = “153,204,255″;
The script for the Clear All button uses the remerge method to remerge the form design and form data. In this case, the method effectively restores the fields, fillable areas, and subforms to their original state.
xfa.form.remerge();
See also 

Changing the background colors of fields, fillable areas, and subforms