This function complements WPALETTE-GET-COLOR; it lets you assign a new color to a particular color number. At entry, WPAL-COLOR-ID should contain the color number you want to change. WPAL-RED, WPAL-GREEN, and WPAL-BLUE should contain the RGB value of the new color (see WPALETTE-GET-COLOR for a description of RGB values).
For example, if you want to make color number 2 represent a dark blue-green, you could use the following values:
WPAL-COLOR-ID | 2 |
WPAL-RED | 0 |
WPAL-GREEN | 64 |
WPAL-BLUE | 64 |
The color palette is the lowest level of color handling in the ACUCOBOL-GT system. It defines the basic set of colors used. Although you are free to change the palette as you see fit, ACUCOBOL-GT makes certain assumptions that you should be aware of. First of all, ACUCOBOL-GT assumes that color 1 is always black, and color 16 is always bright white. Likewise, colors 8 and 9 are assumed to be shades of gray. These assumptions affect the rendering of window shadows and 3-D lines. Additionally, the first 8 colors are assumed to be low-intensity, and the second 8 are high-intensity.
ACUCOBOL-GT computes the high- or low-intensity version of a color by adding or subtracting 8 from its color number. This assumption also affects the rendering of 3-D lines if you use them on a colored background. Although you are not required to maintain any of these assumptions, be aware of them so that you can anticipate the total effects of your changes.