MFXOPEN 

The FOREGROUND-COLOR Clause

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

General Format


Syntax for General Format for the FOREGROUND-COLOR clause

Syntax Rules

  1. FOREGROUND-COLOR and FOREGROUND-COLOUR are equivalent.
  2. This clause is allowed with any screen item.
  3. If this clause is specified at group level, it applies to all elementary subordinate items.
  4. Integer-1 must be a value from 0 to 15.

General Rules

  1. This clause is available for use only with a color screen.
  2. 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.

  3. If this clause is not specified, the foreground color defaults to white.
  4. 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.
  5. 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.
  6. 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.
  7. Identifier-1 must not be subject to OCCURS clauses.
  8. Whether a value of 6 in integer-1 or identifier-1 produces brown or yellow depends on the terminal hardware.