Examples:
COLOR
subprogram
CALL
COLOR
(character'set-number,!oreground-co}or-code,background-calar-code)
The
COLOR
~u1JIJru~ralll
plUviue::; a
puwel
[ul
uc~ilSl1
cdl-'ability by
allowing you
to
specify screen
character
colors, (To change the
screen color itself. see the
SCREEN
subprogram.)
The
character-set-number, foreground'color-code, and background-
color-code are numeric expressions.
Each
character
displayed on your computer screen has two colors.
The
color of the dots
that
make
up the character itself
is
called the
foreground color.
The
color that occupies the
rest
of the
character
position on the screen is called the background color. Sixteen colors
are
available on the
TI
computer. so your entries
for
foreground
and backgroundcolor must have a value of 1 through 16.
The
color
codes
are
given
in
the
table
below:
>NEW
>100
CALL
CLEAR
>110
INPUT
"FOREGROUND?":f
>120
INPUT
"8ACKGROUND?":8
>'I,5()
CALL
tLI;:Ai'I
>140
CALL
COLOR(2,F,B)
>150
CALL
HCHAR(12,3,42,28)
>160
GO
TO
110
:>RUN
Color Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Color
Transparent
Black
Medium Green
Light Green
Dark
Blue
Light Blue
Dark
Red
Cyan
Medium
Red
Lif(ht Red
Dark
Yellow
Light Yellow
Dark
Green
Magenta
Gray
White
--screen
cLears
fOREGROllND~2
8ACKGROUND?14
--screen
cLears
(28
bLack
asterisks
with
a
magenta
background)
FOREGROUND?
(Press CLEAR
to
stop
the
program)
If
transparent (code
1)
is
specified. the present screen color
shows through when a character
is
displayed, Until a
CALL
COLOR
i~
perfurmed,
the
standard
foreground-color
is
black
(code
2)
and the
standard
background-color is transparent (code
1)
for all characters. When a breakpoint occurs, all characters
are
reset
to
the
standard
color::;.
User's Reference Guide
>NE\I
>100
CALL
CLEAR
:>110
CALL
SCREEN(12l
>120
CALL
COLOR(2,1,7)
>130
CALL
HCHAR(12,3,42,28)
>140
GOTD
140
;'>l(lIN
--screen
cLears
(trdflSpdrerit
dstelhk"
with
a
dark-red
background
on a
Light-yeLLow
screen)
(Press CLEAR
to
stop
the
program)
1I·73