qbasic - colours

HomePage | Optical Illusions | War Stories | QBasic | Dads Navy Days | Bristol | Bristol, USA | Bristol, Canada | Terre Haute | Miscellany | Web Stuff | About Ray | Site Map | Site Search | Messages | Credits | Links | Web Rings

QBasic | Errors | 40lb Weight | Bits | Chance | Colours | Dates | Delays | File Dialog | Files | Input | Matching | Menus | Mouse | Numbers | SeqNo | SIRDS | Sorts | Text | Timer | DLoads

Colours

Default colours

Screenshot of Colour.bas

A program using nested loops to show the colours available on the default screen.

DIM TCol AS INTEGER 'Text colour
DIM BCol AS INTEGER 'Background colour

FOR TCol = 0 TO 31

   CLS
   FOR BCol = 0 TO 15
      COLOR TCol, BCol
      PRINT "Text Colour"; TCol;", Background colour";BCol;
   NEXT BCol

   DO
   LOOP UNTIL INKEY$ <> "" 

NEXT TCol 

END 

This program shows the various colours available on the text screen. If when running it you get an error then it means that the values for TCol or BCol may be set too high for your monitor. When run in graphics mode most monitors can show many more colours than these.

Once you have viewed one screen you can move onto the next by pressing any key.

QBasic | Errors | 40lb Weight | Bits | Chance | Colours | Dates | Delays | File Dialog | Files | Input | Matching | Menus | Mouse | Numbers | SeqNo | SIRDS | Sorts | Text | Timer | DLoads

HomePage | Optical Illusions | War Stories | QBasic | Dads Navy Days | Bristol | Bristol, USA | Bristol, Canada | Terre Haute | Miscellany | Web Stuff | About Ray | Site Map | Site Search | Messages | Credits | Links | Web Rings