'=========================================================================== ' Subject: COLOR MIXER Date: 09-22-97 (21:59) ' Author: David Calhoun Code: QB, QBasic, PDS ' Origin: _gotmilk_@geocities.com Packet: GRAPHICS.ABC '=========================================================================== 'ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ '³ This is HEXCOLORS.BAS by David--- ³ '³ Calhoun '97. This is a helpful--- ³ '³ prog. for finding the RGB value-- ³ '³ of just about any color. -------- ³ 'ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ' SCREEN 12 COLOR 4 PRINT "Press R for more red", : COLOR 2: PRINT "Press G for more green", : COLOR 1: PRINT " Press B for more blue" COLOR 4 PRINT "Press 1 for less red", : COLOR 2: PRINT "Press 2 for less green", : COLOR 1: PRINT " Press 3 for less blue" COLOR 7 PRINT PRINT " Press "; CHR$(24); " for all up Press D for Default color. Press "; CHR$(25); " for all down" COLOR 3 r = 0: g = 0: b = 0 rr = 310: gg = 310: bb = 310 l$ = "" DO UNTIL l$ = CHR$(27) l$ = UCASE$(l$) l$ = INKEY$ IF l$ = "r" AND r < 63 THEN LINE (30, rr)-(50, rr), 0: r = r + 1: rr = rr - 3 IF l$ = "g" AND g < 63 THEN LINE (90, gg)-(110, gg), 0: g = g + 1: gg = gg - 3 IF l$ = "b" AND b < 63 THEN LINE (150, bb)-(170, bb), 0: b = b + 1: bb = bb - 3 IF l$ = "1" AND r > 0 THEN LINE (30, rr)-(50, rr), 0: r = r - 1: rr = rr + 3 IF l$ = "2" AND g > 0 THEN LINE (90, gg)-(110, gg), 0: g = g - 1: gg = gg + 3 IF l$ = "3" AND b > 0 THEN LINE (150, bb)-(170, bb), 0: b = b - 1: bb = bb + 3 IF l$ = CHR$(0) + "H" AND r < 63 AND g < 63 AND b < 63 THEN LINE (30, rr)-(50, rr), 0 LINE (90, gg)-(110, gg), 0 LINE (150, bb)-(170, bb), 0 r = r + 1: g = g + 1: b = b + 1 rr = rr - 3: gg = gg - 3: bb = bb - 3 END IF IF l$ = CHR$(0) + "P" AND r > 0 AND g > 0 AND b > 0 THEN LINE (30, rr)-(50, rr), 0 LINE (90, gg)-(110, gg), 0 LINE (150, bb)-(170, bb), 0 r = r - 1: g = g - 1: b = b - 1 rr = rr + 3: gg = gg + 3: bb = bb + 3 END IF IF l$ = "d" THEN LINE (30, rr)-(50, rr), 0 LINE (90, gg)-(110, gg), 0 LINE (150, bb)-(170, bb), 0 r = 0: g = 0: b = 0: rr = 310: gg = 310: bb = 310 END IF LINE (40, 122)-(40, 309), 4 LINE (100, 122)-(100, 309), 2 LINE (160, 122)-(160, 309), 1 LINE (30, rr)-(50, rr), 4 LINE (90, gg)-(110, gg), 2 LINE (150, bb)-(170, bb), 1 OUT &H3C8, 3 OUT &H3C9, r OUT &H3C9, g OUT &H3C9, b CIRCLE (400, 240), 131, 8 CIRCLE (400, 240), 130 PAINT (400, 240) COLOR 8 LOCATE 7, 4 PRINT r LOCATE 7, 11 PRINT g LOCATE 7, 18 PRINT b COLOR 3 LOOP COLOR 8