User Guide

Acrobat Forms - JavaScript Object Specification
18
Color Properties
The color object defines the following colors and there associated keywords:
Example:
// This example sets the text color of the field to red
// if the value of the field is negative, else it sets it
// to black.
var f = event.target; /* field that the event occurs at */
if (event.value < 0)
f.textColor = color.red;
else
f.textColor = color.black;
Color Object Keyword Version
Transparent color.transparent
Black color.black
White color.white
Red color.red
Green color.green
Blue color.blue
Cyan color.cyan
Magenta color.magenta
Yellow color.yellow
Dark Gray color.dkGray
Gray color.gray
Light Gray color.ltGray
4.0
4.0
4.0