<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


Colour Table

Here's a list of the colour character sets that are used in TurboForth for 32 column mode. Note that they differ from the colour set numbers in TI BASIC and TI Extended Basic. This is because TurboForth gives you access to all 256 characters of the ASCII character set, whereas TI BASIC and Extended Basic does not.

A useful list of colours is presented here. They are the same colour values as found on the Editor Assembler Quick Reference Card. To convert from TI BASIC or Extended Basic colours, simply subtract 1 from the BASIC colour value.

The colour values can also be used for the word SCREEN which sets the colour of the screen background. In 32 column mode (GMODE=1) just use the value from the table below and it will set the screen colour. Note: Character backgrounds should be set to transparent to allow screen colour to show through! In 40 column mode (GMODE=0) and 80 column mode (GMODE=2), the most significant nybble (4-bits) is the text colour, and the least significant nybble is the screen colour. So, for example, to set white text on black screen, in GMODE 0, simply use the hexadecimal value $F0. Example: 0 GMODE  $F0 SCREEN

ASCII Colour Sets   Colour Values
Colour Sets ASCII
Character
Range
TurboForth TI Basic
0 N/A 0 7
1 N/A 8 15
2 N/A 16 23
3 0 24 31
4 1 32 39
5 2 40 47
6 3 48 55
7 4 56 63
8 5 64 71
9 6 72 79
10 7 80 87
11 8 88 95
12 9 96 103
13 10 104 111
14 11 112 119
15 12 120 127
16 13 128 135
17 14 136 143
18 N/A 144 151
19 N/A 152 159
20 N/A 160 167
21 N/A 168 175
22 N/A 176 183
23 N/A 184 191
24 N/A 192 199
25 N/A 200 207
26 N/A 208 215
27 N/A 216 223
28 N/A 224 231
29 N/A 232 239
30 N/A 240 247
31 N/A 248 255
        
Colour Value Colour
Hex Decimal
0 0 Transparent
1 1 Black
2 2 Medium Green
3 3 Light Green
4 4 Dark Blue
5 5 Light Blue
6 6 Dark Red
7 7 Cyan
8 8 Medium Red
9 9 Light Red
A 10 Dark Yellow
B 11 Light Yellow
C 12 Dark Green
D 13 Magenta
E 14 Grey
F 15 White

Article uploaded 17 July 2017


<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>