


This chapter explains what to do if you want your background and foreground color choices to look appropriate in both character-based and graphical environments. The information applies to both black-and-white and multi-color screens.
Many programs written for graphical environments use a white or gray background. This is not the norm for character-based programs. Because of this, chances are good that a character-based application will look out of place when it's run under a graphical environment (such as Microsoft Windows).
You may want to consider using COBOL configuration variables to map your color scheme to a scheme that's more appropriate for a graphical environment. The COBOL program can then remain the same in both types of environments.
With its default settings, ACUCOBOL-GT will display your application using the colors your application specifies. This means your application will look the same whether it's running under a character-based or graphical operating system.
If you want your application to look the same under both types of systems, then you don't need to do any color mapping.
However, when an application is moved from a character-based environment to a graphical environment, many developers choose to adjust the color scheme. They do this in order to match the style of other applications running in the graphical environment. This is especially true if the applications normally use a black background, which would seem out of place in many graphical environments.
You can choose to:
Although ACUCOBOL-GT contains several configuration variables that simplify the mapping of your colors, two in particular are of note. COLOR-MODEL and COLOR-TABLEcombine the effects of several variables to give you high-level control over color combinations. The other variables (described in Appendix L, Book 4, "Appendices") permit additional fine-tuning.
COLOR-MODEL affects colors in a global way (for example: exchange foreground and background colors). COLOR-TABLE affects specific color combinations (transform a red foreground on a black background into white on blue).
So if you decide to change any of your colors using configuration variables, you would typically start by adjusting the COLOR-MODEL setting to establish a global color scheme for your program. Then you'd adjust specific colors, if necessary, with the COLOR-TABLE setting.
Using these two variables, you'll probably be able to adjust your application to assume a graphical look with little or no COBOL coding.