Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF (EN)

140 GCOL 0,3 White graphics The two groups of statements above change the ‘text foreground’ and ‘graphics foreground’ colours. You will have noticed that, so far, 1 represents red, 2 is yellow and so on. To change the background colours we add 128 to these numbers. Thus COLOUR 129 will give a red text background, and GCOL 0,129 would set the graphics background colour to red. For text, for example, to change from white lettering on black, to black lettering on red in MODE 5, type MODE 5 COLOUR 129 COLOUR 0 CLS All text will now be in black and red. Graphics will still appear in white.

To change text colours in the middle of a program simply insert the appropriate colour statements before the print statements to which they refer. For graphics use the GCOL statement which stands for ‘Graphics COLours’. GCOL has two numbers after it (see the BASIC keywords chapter). The second number refers to the logical colour which is to be used for graphics in the future. The first number is usually set at 0. So for example, to get red graphics lines on a yellow background, type COLOUR 131 GCOL 0,1 CLS But suppose that you wanted a blue background in MODE 5 . So far the only available colours have been black, red, yellow and white and there is a limit of four colours in MODE 5 .

You can make one of four colours blue if you want to. You do this with the statement VDU 19,0,4,0,0,0 and then the four available colours would be blue, red, yellow and white. In MODE 5 , only four colours are available at a time and they are referred to as ‘logical’ colours 0 to 3. In MODE 5 ‘logical’ colour 0 is normally black, ‘logical’ colour 1 is normally red and so on but you can change the ‘actual colour’ of the ‘logical colours’ easily by using the VDU 19 statement followed by five numbers, separated by commas. In a two colour mode such as MODE 4 we can do similar things eg MODE 4