C. Writing Termcap Descriptions : Commands for Advanced Features (Windows Environment) : Commands Used for Color (Windows)
Share this page                  
Commands Used for Color (Windows)
The following commands are used to define color in monitors that support color. They are mapped to the color codes, from 0 to 7, as defined for the VIFRED form.
The ya command specifies the default colors for background and foreground objects. The other color‑related commands indicate colors for fields as specified in the VIFRED attributes form. The following is an example of the format in which you specify the background and foreground colors:
In this example, the 1 specifies a background color of blue and the F specifies a foreground color of white.
Alternatively, you can express these color specifications in the embedded query language with the set_frs statement and in 4GL with the set_forms statement. For more information, see your query language reference guide or the Forms-based Application Development Tools User Guide.
For each color specification, you can also specify a default font. For more information, see Font Specifications (Windows) (see page Font Specifications (Windows)).
All the commands are strings and can have optional padding. The commands are described in the following table:
Windows Display Code
Default color (0)
Alternate color #1
Alternate color #2
Alternate color #3
Alternate color #4
Alternate color #5
Alternate color #6
Alternate color #7
The following chart shows codes for color displays:
Codes for Background
Codes for Foreground
0 = black
0 = black
1 = blue
1 = blue
2 = green
2 = green
3 = cyan
3 = cyan
4 = red
4 = red
5 = magenta
5 = magenta
6 = yellow
6 = brown
7 = white
7 = light grey
8 = blinking black
8 = dark grey
9 = blinking blue
9 = light blue
A = blinking green
A = light green
B = blinking cyan
B = light cyan
C = blinking red
C = light red
D = blinking magenta
D = light magenta
E = blinking yellow
E = yellow
F = blinking white
F = white
For all systems, the ya entry is used for the normal attribute (that is, no underscore, reverse video, high intensity, or blinking).
For color systems, the us, rv, bo, bl and the za through zk entries are used only with color 0 (entry ya). These attributes work for other colors as you would expect if the flags are set for a field. For example, white on red becomes red on white if reverse video is set, and light green on black becomes green on black if change intensity is set.
Some of the termcap color commands that are used by Ingres forms are shown in the following table:
Forms and Menus
Background for Ingres forms and the ring menu line when the menu is active
Tablefields in Ingres forms
Some simple fields in certain Ingres forms
Some simple fields in certain Ingres forms
Some simple fields in certain Ingres forms
Some simple fields in certain Ingres forms