
The FOREGROUND-COLOR Clause
The FOREGROUND-COLOR clause specifies the foreground color of the screen
item.
General Format

Syntax Rules
- FOREGROUND-COLOR and FOREGROUND-COLOUR are equivalent.
- This clause is allowed with any screen item.
- If this clause is specified at group level, it applies to all elementary
subordinate items.
- Integer-1 must be a value from 0 to 15.
General Rules
- This clause is available for use only with a color screen.
- Integer-1 or identifier-1 specifies the foreground color of the screen item.
The colors and their corresponding values are:
0 |
black |
1 |
blue |
2 |
green |
3 |
cyan |
4 |
red |
5 |
magenta |
6 |
brown or yellow |
7 |
white | |
8 |
grey |
9 |
light blue |
10 |
light green |
11 |
light cyan |
12 |
light red |
13 |
light magenta |
14 |
yellow |
15 |
high intensity white | |
On a color screen, if the value is from 8 to 15, this is equivalent to specifying
an integer from 0 to 7 and specifying the HIGHLIGHT clause. On a monochrome
screen, this is equivalent to simply specifying the HIGHLIGHT clause.
- If this clause is not specified, the foreground color defaults to white.
- If a screen description contains a BLANK SCREEN clause, and either contains
a FOREGROUND-COLOR clause or is subordinate to one that does, then when the
screen item is displayed by a DISPLAY statement the specified color becomes
the default foreground color. It remains the default foreground color until
either another screen item with this combination of options is displayed (whether
in the same DISPLAY statement or another), or a Format 3 DISPLAY statement
with both options is executed.
- If the HIGHLIGHT clause is also specified, foreground colors are brightened
and lightened; for example on some hardware, black can become grey and brown
can become yellow. However, this does not apply to the BLANK SCREEN clause.
- Identifier-1 must be an unsigned numeric integer and should contain a value
between 0 and 7. Any value higher than 7 is divided by 8 and the remainder
used as the color value.
- Identifier-1 must not be subject to OCCURS clauses.
- Whether a value of 6 in integer-1 or identifier-1 produces brown or yellow
depends on the terminal hardware.