Color Coding of Fields in Detail and Edit Pages
To support color coding in Detail and Edit pages, a Form object is required and a custom handler must be registered for the form. For information about methods of the Form object, see the table in JavaScript API Reference, and for an example of a custom handler, see Example of a Custom Handler for a Form Object.
The custom handler is automatically executed when the form initially loads or refreshes due to any other actions on the screen such as inline editing. In the custom handler you can use methods of the Field object to get and set colors for the labels and values of fields, see the table in JavaScript API Reference.