Try OpenEdge Now
skip to main content
Managing ABL Applications
ABL and R-code Deployment and Management : Maintaining User Environments : Maintaining the UNIX user environment : Specifying colors
 
Specifying colors
You specify colors in the OpenEdge terminal-specific key functions and capabilities section of PROTERMCAP. You can specify up to 123 color fields in a terminal entry. This manual refers to the color specifications as the color table.
Each line in the table performs two semantic functions: it defines a foreground/background color pair and it maps that color pair to an integer from 5 to 127. The integer is how an application references the color pair when making color assignments to a widget. (An application typically assigns two color pairs to a widget: one for display mode and another for prompt mode.)
Use the following syntax to specify a color field in a PROTERMCAP terminal entry:

Syntax

COLOR color-number[color-name]=start-sequence:stop-sequence:
color-number
An integer from 5 to 127 that specifies the location of the color in the color table. The color number is the mechanism used to assign a color pair in an application.
color-name
The name of the color. You can use any color value except an ABL keyword. Although this is optional, including a name makes the color section of the terminal entry self-documenting (you cannot embed comments) and also makes the color specifications backwardly compatible.
start-sequence
The character sequence that starts the color attribute.
stop-sequence
The character sequence that stops the color attribute.
For example, the following fields from the Wyse 370 terminal define color table locations 5 and 6:
COLOR 5 RED/BLACK=\E[31;40m:\E[m:\
COLOR 6 GREEN/BLACK=\E[32;40m:\E[m:\
OpenEdge reserves color table locations 0 to 4 as follows:
*Color 0 holds the Version 6 color NORMAL, which is set by the terminal initialization (is) field.
*Color 1 holds the Version 6 color INPUT and is set and cleared by us and ue. As installed, this is underline mode.
*Color 2 holds the Version 6 color MESSAGE and is set and cleared by so and se. As installed, this is reverse-video.
*Color 3 holds the colors used for high intensity and is set and cleared by HS and HR.
*Color 4 holds the colors used for blink and is set and cleared by BB and BR.
Note: As installed, the PROTERMCAP file does not support spacetaking (embedded attribute) terminals. These are terminals that use characters on the display to hold control codes for video and color capabilities. If you add support for such terminals, OpenEdge ignores the capability when displaying the interface.