17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

COLOR Statement<br />

Purpose:<br />

To select display colors<br />

Syntax:<br />

COLOR [foreground][,[background][,border]]<br />

COLOR [background][,[palette]]<br />

COLOR [foreground][,[background]]<br />

Comments:<br />

In general, COLOR allows you to select the foreground and background colors for the display. In<br />

SCREEN 0 a border color can also be selected. In SCREEN 1 no foreground color can be selected,<br />

but one of two four-color palettes can be selected for use with graphics statements. The different<br />

syntaxes and effects that apply to the various screen modes are described below:<br />

Mode Effect<br />

SCREEN 0 Modifies the current default text foreground and background colors, and the<br />

screen border. The foreground color must be an integer expression in the range<br />

0-31. It is used to determine the "foreground" color in text mode, which is the<br />

default color of text. Sixteen colors can be selected with the integers 0-15. A<br />

blinking version of each color can be selected by adding 16 to the color number;<br />

for example, a blinking color 7 is equal to 7 + 16, or 23. Thus, the legal integer<br />

range for foreground is 0-31.<br />

The background color must be an integer expression in the range 0-7, and is the<br />

color of the background for each text character. Blinking colors are not permitted.<br />

The border color is an integer expression in the range 0-15, and is the color<br />

used when drawing the screen border. Blinking colors are not permitted.<br />

If no arguments are provided to COLOR, then the default color for background and<br />

border is black (COLOR 0), and for foreground, is as described in the SCREEN<br />

statement reference pages.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/COLOR.html (1 of 3)28/03/2004 21.29.16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!