[background] and [foreground]
The [background] and [foreground] sections of the initialization file determine how Uniface video attributes are mapped to Uniface index colors for Windows and character mode applications.
Each section defines four sets (Normal
, Bright
, Blink
, and BrightBlink
) of eight colors, each specified as
an RGB (red, green, or blue) value.
Description
The color of an object consists of a foreground and a background color and each setting is taken from its own section. The combined state of the bright and blink video attributes determines the color set that is used. The color number (0 through 63) determines which color of each set is used.
When specifying colors, foreground colors are mapped to the nearest color that can always be displayed as a solid color by the current display device. This limits your choice to the 16 or 20 colors in some Microsoft Windows system palettes.
The settings in the [background] and [foreground] sections may be ignored when displaying forms and widgets if COLORZERO and SYSTEMCOLORS are set.
Color | Foreground Color | Background Color |
---|---|---|
System default | 0 | 0 |
Blue | 8 | 1 |
Green | 16 | 2 |
Cyan | 24 | 3 |
Red | 32 | 4 |
Purple | 40 | 5 |
Yellow | 48 | 6 |
White | - | 7 |
Black | 56 | - |
For example:
[foreground] normal=0,0,0, 0,0,255, 0,255,0, 0,255,255, 255,0,0, 255,0,255, 255,255,0, 0,0,0 bright=128,128,128, 0,0,128, 0,128,0, 0,128,128, 128,0,0, 128,0,128, 128,128,0, 128,128,128 blink=255,255,255, 192,192,192, 0,255,0, 0,255,255, 255,0,0, 255,0,255, 255,255,0, 255,255,255 brightblink=128,128,128, 0,0,128, 0,128,0, 0,128,128, 128,0,0, 128,0,128, 128,128,0, 128,128,128 [background] normal=192,192,192, 0,0,255, 0,255,0, 0,255,255, 255,0,0, 255,0,255, 255,255,0, 255,255,255 bright=192,192,192, 0,0,255, 0,255,0, 0,255,255, 255,0,0, 255,0,255, 255,255,0, 255,255,255 blink=0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255 brightblink=0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255