%= - Assigning Colors to Fields

#### Search Results

Search

# %= - Assigning Colors to Fields

`%=` |  |  |  |  | blank |  |  |  |  |  | ,...2 |
|  |  | `F` |  |  |  |  |
|  |  | `N` |  |  |  |  |
|  |  | `O` |  |  |  |  |
`M` | attribute |
`T` |  |
| `BG` |  |  | = color
| `WN` |  |  |
| `PT` |  |  |
| `FR` |  |  |

With this command, you can assign colors to field attributes for programs that were originally not written for color support. The command causes all fields/text defined with the specified attributes to be displayed in the specified color.

If predefined color assignments are not suitable for your terminal type, you can use this command to override the original assignments with new ones.

You can also use this command within Natural editors, for example, to define color assignments dynamically during map creation.

Command | Function
--- | ---
General settings:
blank | Clear color translate table.
F | Newly defined colors are to override colors assigned by program.
N | Color attributes assigned by program are not to be modified.
Field types:
O | Output fields (`AD=O`). For detailed information on the session parameter AD, see Field Input/Output Characteristics in the Parameter Reference documentation.
M | Input fields; that is, input-only fields (`AD=A`) and modifiable fields (`AD=M`).
T | Text constants.
Possible field attributes:
B | Blinking
C | Italic
D | Default
I | Intensified
U | Underlined
V | Reverse video
A color can also be assigned to the following parts of a screen:
BG | Background
WN | Foreground (that is, fields for which no color is defined)
PT | Default page title
FR | Frame of a window
Possible colors:
BL | Blue
GR | Green
NE | Neutral
PI | Pink
RE | Red
TU | Turquoise
YE | Yellow

Example:

     %=TI=RE,OB=YE

This example assigns color red to intensified text fields and color yellow to all blinking output fields.

See also Assigning Colors to Fields - Terminal Command %= in the Programming Guide.