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 |
8 |
grey |
1 |
blue |
9 |
light blue |
2 |
green |
10 |
light green |
3 |
cyan |
11 |
light cyan |
4 |
red |
12 |
light red |
5 |
magenta |
13 |
light magenta |
6 |
brown or yellow |
14 |
yellow |
7 |
white |
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.