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:
:ya=1F
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:
Command
Description
Windows Display Code
ya
Default color (0)
ya=1F
yb
Alternate color #1
yb=1F
yc
Alternate color #2
yc=1A
yd
Alternate color #3
yd=1E
ye
Alternate color #4
ye=30
yf
Alternate color #5
 
yg
Alternate color #6
yg=0F:\
yh
Alternate color #7
yh=2F:\
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:
Command
Forms and Menus
ya
Background for Ingres forms and the ring menu line when the menu is active
yb
Tablefields in Ingres forms
yc
Some simple fields in certain Ingres forms
yd
Some simple fields in certain Ingres forms
us
Some simple fields in certain Ingres forms
bo
Some simple fields in certain Ingres forms