NAME

color - set the “color” of the screen

SYNOPSIS

color [Foreground][, Background]

DESCRIPTION

Color sets the “color” for display of subsequent output.  Unfortunately, the only colors available are black and white so this statement provides for reverse video and underlining only. 

Foreground is an integer expression which specifies the color of the characters printed on the display and is, by definition, normally white.  The value of Foreground may be zero for black, one for white with underlining or two through seven for white (no underlining).  Background is an integer expression which specifies the color of the display background and is, by definition, normally black.  The value of Background may be seven for white or zero through six for black. 

EXAMPLE

In practice, only three display modes are possible: normal, underlined and reverse video.  The program
	color 0,7: print "This is reverse video"
	color 1,0: print "This is underlined"
	color 7,0: print "This is normal"
demonstrates these modes. 

USAGE NOTES

The method of producing the "stand-out" and underlining modes on the terminal is determined by examining the environment variable TERM and looking up the terminal in the system’s terminal capability database, either /etc/termcap or /usr/lib/terminfo.  If this information is not available, the display is left normal. 

DIAGNOSTICS

If either Foreground or Background is less than zero or greater than 255, an "Illegal function call" error occurs. 

In the description above, only values less than eight are discussed.  Larger values may be specified; they are divided by eight and the remainder is used.  For example, a Foreground value of 25 may be specified and is regarded as a one for underlining. 

Specifying white on white or black on black is not an error, but nothing happens. 

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber