Most likely the field highlight color changes the color of your field when you exit it. You should either disable it (Edit - Preferences - Forms) or change something else, like the border color.
This kind of question belongs more in the Acrobat Forms or Acrobat Javascript forums, though. This forum is about the Acrobat SDK.