Colors Menu

The Colors menu and associated dialog box allows you to redefine A-Shell’s color palette. By default, A-Shell uses the same 16-color palette used by AMOS, as shown in the table below:

Color #

Color Name

 

Color #

Color Name

0

Black

 

8

Dim Black (Dark Gray)

1

White

 

9

Dim White (Light Gray)

2

Blue

 

10

Dim Blue

3

Magenta

 

11

Dim Magenta

4

Red

 

12

Dim Red

5

Yellow

 

13

Dim Yellow

6

Green

 

14

Dim Green

7

Cyan

 

15

Dim Cyan

 

As the table suggests, the color numbers 8 thru 15 are normally just dim versions of the corresponding colors 0 thru 7, and in fact, are normally not specified directly. Instead, an application typically selects dim or bright (via TCRT commands 11 and 12) and a pair of foreground and background colors from the range of 0 thru 7. (The foreground color is used for displaying text and other non-space characters, while the background color applies to the space behind and between the characters.) Setting dim mode is effectively equivalent to adding 8 to the color numbers.

When an application outputs to the screen, A-Shell responds to, and stores, the color palette index numbers rather than the colors themselves. It translates the numbers into colors using the current palette definition. Therefore, there are two ways to change the colors used in an application. One is to change the color numbers themselves that are used by the application and the other is to change what the numbers mean (i.e. change the palette definition which associates actual colors with the color numbers.)

There are several ways to change the color numbers used by an application, including SET.LIT, INI.CLR, and Tab(-2,x) and Tab(-3,x) commands within BASIC programs. In contrast, this menu/dialog allows you to change the just the meaning of the color numbers.

The dialog expresses the color palette in terms of three sets of eight colors: one for normal intensity (aka bright) foreground colors, one for reduced intensity (aka dim) and one for background colors. To change any of these, just click on the button next to the number, and choose a new color. The subsequent dialog box presents a selection 48 "stock" colors, plus a button allowing you to define a custom color.

The official names associated with the color palette numbers will not change. Thus, you can redefine color 2, which is normally "Blue", to something more like lavender, but the button next to color 2 will continue to read "Blue".

After you choose a new color, the effect will be immediate when you return to normal A-Shell/Windows run mode. However, you will only notice a change if parts of the current screen are using the color number(s) which you redefined. Consider, for example, a typical "green screen" monochrome application, which uses color 6 (green) for foreground text and 0 (black) for the background. If you redefine color 2 to be lavender, you will not see any change in the application display because it wasn’t using color 2. If, however, you redefined color 0 to be maroon instead of black, then the application display will immediately change from green on black to green on maroon.

After changing the color definitions, the effect will only last for the duration of the current A-Shell session, unless you use the File..Save or Save As menu selections to save them. Note that unless you want your color definitions to affect all other users, you may want to save them in a private settings file and adjust your icon shortcut to reference that private settings file. (See the –o switch in the A-Shell command line reference for further information.)

Because of the multiple techniques available for customizing colors, it would probably be a good idea not to overboard in redefining colors on the Colors menu/dialog. For example, you might want to go for a more sophisticated look by choosing more pastel versions of the standard colors. But if you redefine color 2 (normally blue) to yellow (normally 5), and color 6 (normally green) to magenta (normally 3), the resulting confusion will likely hamper any efforts to use any of the other color configuration techniques.

To achieve the most "Windows-like" look, we recommend using the SET TERM SYSBCOLOR 1 command to associate background color 1 (normally white) with the current default Windows dialog box color (typically gray). If you then arrange for the application to select background color 1 (perhaps via a SET TERM BCOLOR 1 command in a command file or by changing the SCNCLR parameter of the INI.CLR configuration file) and a suitably contrasting dark foreground color (such as 0 or 2), even a legacy "green screen) application can take on a more Windows-like look. As an added bonus, by tying the background color to the standard Windows colors, it will adjust automatically to a change in the Windows desktop palette (accomplished via the Control Panel.)

It is also possible to redefine the colors associated with the color palette numbers using AG_PALETTE, Define or Query Color Palette.

See Also

•   Color Customization