ContentsIndexPreviousNext

Step 3 - Transform Colors

The configuration variable COLOR-TRANS determines how the initial colors are transformed (see, also, the entry for COLOR-TRANS in Appendix H). It may be set to any of these values:

0
By default, COLOR-TRANS is set to "0", which causes no transformation.
1
This mode causes the foreground and background colors to be exchanged for each other. This is equivalent to running the entire program in reverse-video.
2
This causes white to be exchanged for black and black to be exchanged for white. The foreground and background colors are transformed independently. For example, a green foreground on a black background would turn into a green foreground on a white background. This setting usually has the effect of transforming a black background into white while maintaining the general color scheme of the application.
3
The foreground and background colors are exchanged for each other, but only if they are both black or white. If either the foreground or background contains a color other than black or white, then nothing happens. This is equivalent to running the monochrome parts of your program in reverse-video while maintaining the color portions unchanged.
4
The foreground and background colors are exchanged for each other, but only if the background is black. This mode insures that you never have a black background.
5
If the colors are foreground white and background black, they are exchanged for each other. Otherwise, nothing happens.

Generally speaking, you could use the COLOR-TRANS variable as a starting point in converting an application to appear more natural under a graphical environment such as Windows. Note that if your application is entirely black-and-white, then the first three COLOR-TRANS options are essentially identical.