6.24.5.2 Color themes

Depending on whether you use a light or dark background, some colors tend to lead to too-low contrast. Therefore, Gforth supports adjusting its colors to the background with light-mode (for light background) and dark-mode for dark background.

Gforth tries to select the right mode automatically, but that does not always work. In order to avoid having to set the theme every time you enter Gforth, you can set the environment variable GFORTH_INIT before starting Gforth. Possible values are: light, dark, uncolored, or auto (default).

In addition, you can specify an input theme (separated from the mode theme by a space in GFORTH_INIT if both are present): magenta or default (default).

light-mode ( ) gforth-1.0

Color theme for white background: sets the colors for future uses of color output words (see Color output).

dark-mode ( ) gforth-1.0

Color theme for black background: sets the colors for future uses of color output words (see Color output).

uncolored-mode ( ) gforth-1.0

“Color theme” that does not set colors: all the color output words (see Color output) just set the default colors or (for status bar colors) the inverted default colors. This mode does not set colors, but uses the default ones.

magenta-input ( ) gforth-1.0

Future use of input-color will result in further output in magenta, which may be easier to recognize in presentations than just bold.

default-input ( ) gforth-1.0

Future use of input-color will result in further output in bold foreground color (the default setting).