'=========================================================================== ' Subject: PALETTE COLOURS WITHOUT PALETTE Date: 09-26-98 (17:29) ' Author: Alexander Meyer Code: QB, QBasic, PDS ' Origin: Meyer.Karl@t-online.de Packet: GRAPHICS.ABC '=========================================================================== ' //// ' 0(o o)0 '-------------------------ooO (_) Ooo--------------------- ' PALETTE.BAS -- Written in QuickBasic 4.5 ' ' Name: Palette colours without "PALETTE" ' Author: Alexander Meyer ' Date: 09-26-1998 ' Description: Choose background colours using OUT &H3C8 ' and OUT &H3C9 ' 'For questions or comments mail to: Meyer.Karl@t-online.de '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- SCREEN 0 CLS OUT &H3C8, Attribute OUT &H3C9, 0 OUT &H3C9, 0 OUT &H3C9, 0 DO Attribute = 0 OUT &H3C8, Attribute COLOR 15 LOCATE 1 PRINT "Up arrow: More red" PRINT "Down arrow: Less red" PRINT "8: More green" PRINT "2: Less green" PRINT "Q: More blue" PRINT "A: Less blue" LOCATE 15: PRINT "Red:"; r PRINT "Green:"; g PRINT "Blue:"; b DO K$ = INKEY$ LOOP WHILE K$ = "" SELECT CASE K$ CASE CHR$(0) + "H": r = r + 1: IF r > 63 THEN r = 63 CASE CHR$(0) + "P": r = r - 1: IF r < 0 THEN r = 0 CASE "8", "(": g = g + 1: IF g > 63 THEN g = 63 CASE "2", CHR$(34): g = g - 1: IF g < 0 THEN g = 0 CASE "Q", "q": b = b + 1: IF b > 63 THEN b = 63 CASE "A", "a": b = b - 1: IF b < 0 THEN b = 0 CASE CHR$(27) OUT &H3C9, 0: OUT &H3C9, 0: OUT &H3C9, 0 END END SELECT OUT &H3C9, r OUT &H3C9, g OUT &H3C9, b LOOP END