'CM3DEMO1.BAS is an example program that shows how the file COLORS1.PAL 'was included in a VGA graphics program. To see the file choose 'Included Lines from the View menu. 'set screen mode before $INCLUDE metacommand 'screen 12 allows up to 15 foreground colors 'with 640 x 480 resolution 'to set the background color assign a color number 'to attribute 0 (the default is black) 'PALETTE 0, ColorNumber& 'ColorNumber& = (blue% * (256 ^ 2)) + (green% * 256) + red% SCREEN 12 CLS ' include the file with the PALETTE statements REM $INCLUDE: 'COLORS1.PAL' 'draw boxes using the colors in the file LINE (10, 10)-(100, 100), 1, BF LINE (100, 100)-(190, 190), 2, BF LINE (190, 190)-(280, 280), 3, BF LINE (280, 280)-(370, 370), 4, BF LINE (370, 370)-(460, 460), 5, BF LINE (510, 10)-(600, 100), 6, BF LINE (510, 100)-(400, 200), 7, BF LINE (20, 400)-(100, 450), 8, BF LINE (10, 300)-(100, 350), 9, BF LINE (210, 30)-(300, 60), 10, BF LINE (150, 410)-(200, 450), 11, BF LINE (510, 400)-(600, 460), 12, BF LINE (510, 300)-(600, 380), 13, BF LINE (310, 160)-(390, 200), 14, BF LINE (20, 210)-(100, 250), 15, BF 'wait for a key DO: LOOP WHILE INKEY$ = "" 'restore the screen to text mode, end program CLS SCREEN 0 END