Colors
DocOrigin scripting defines a number of pre-defined color names that can be used on document objects. You can also specify colors using standard RGB notation.
Setting Colors
Colors may be set by either specifying the RGB value of the color or using one of the pre-defined color names from the table below. RGB values must be specified as a 6-digit hex code with an optional # character preceding it. As of version 3.0.002.07 colors may also be specified as a 3-digit hex code such as #3fe which will be expanded to #30f0e0. (This is compatible with standard browser syntax).
When the color of a DocOrigin object is returned it will always be returned in the 6-digit format, with no leading # character.
Address._color = "red"; Item._color = "FF0000"; // equivalent of "red" Item2._color = "#FF0000"; // alternate notation a = Item2._color; // returns "FF0000"
Note that all color settings - whether pre-defined names or hex codes - must be defined as strings.
Pre-defined Colors
Transparent | FFFFFFFF | |
Beige | F5F5DC | |
Black | 000000 | |
Blue | 0000FF | |
Brown | A52A2A | |
Coral | FF7F50 | |
Cyan | 00FFFF | |
DarkGray | A9A9A9 | |
GreenYellow | ADFF2F | |
Gray | 808080 | |
Green | 00FF00 | |
LightBlue | ADD8E6 | |
LightCyan | E0FFFF | |
LightGreen | 90EE90 | |
LightGray | D3D3D3 | |
LightPink | FFB6C1 | |
LightYellow | FFFFE0 | |
Magenta | FF00FF | |
Orange | FFA500 | |
Pink | FFC0CB | |
Red | FF0000 | |
Salmon | FA8072 | |
Turquoise | 40E0D0 | |
Yellow | FFFF00 | |
White | FFFFFF |
To set the text background to transparent use:
this._backgroundColor = "transparent";