'=========================================================================== ' Subject: VGA PALETTE Date: 06-13-00 (10:56) ' Author: Homer Richardson Code: QB, QBasic, PDS ' Origin: hcrichardson@earthlink.net Packet: GRAPHICS.ABC '=========================================================================== DEFINT A-Z REM -------------------- Look at SUB README ------------------------ REM From 99 colors COMMON SHARED milo, red, green, blue, magenta, cyan, yellow, black COMMON SHARED brass, gold, copper, pine, pink.hot, sky, plum, white REM From 64 colors COMMON SHARED wine, pumpkin, sand, midnight, sunset, lily, orange COMMON SHARED cherry, pea, lemon, mint, daisy, Brick DECLARE SUB delay (n!, k) DECLARE SUB MakePalet64 () DECLARE SUB viewpalet64 () DECLARE SUB makepalet99 () DECLARE SUB palet99 () DECLARE SUB ViewPalet99 () DECLARE SUB palet64 () DECLARE SUB colours64 () DECLARE SUB colours99 () DIM SHARED HTML$(99), palnum#(99), ShortName$(99), LongName$(64) DIM SHARED Colour$(15), Palet(15) REM GOTO Quicklook99 REM GOTO Quicklook64 SCREEN 12 colours99 palet99 ViewPalet99 LOCATE 2, 40 PRINT "This is screen 12" LOCATE 14, 40 PRINT "Use colors like this" LOCATE , 30 PRINT "LINE (200, 50)-(555, 200), white, B" LOCATE , 30 PRINT "PAINT (201, 51), pink.hot, white" LOCATE , 30 PRINT "LINE (250, 70)-(500, 170), green, BF" PRINT LOCATE , 30: COLOR yellow PRINT "Details in SUB README" LINE (200, 50)-(550, 200), white, B PAINT (201, 51), pink.hot, white LINE (250, 70)-(500, 170), green, BF PRINT : PRINT COLOR white LOCATE 24, 3: PRINT "Any key" delay .3, n Blink: COLOR white LOCATE 23, 30 PRINT "Blinking text is easy" delay .3, n IF n > 0 THEN GOTO dun COLOR milo LOCATE 23, 30 PRINT "Blinking text is easy" delay .3, n IF n > 0 THEN GOTO dun GOTO Blink dun: SCREEN 13 palet99 ViewPalet99 PRINT PRINT "This is Screen 13" PRINT "Any key" a$ = INPUT$(1) SCREEN 9 WIDTH , 43 colours64 palet64 viewpalet64 PRINT PRINT " This is Screen 9" LOCATE 23, 2 PRINT "Any key" LOCATE 23, 30 PALETTE 7, 63: COLOR 7 PRINT "Another way to blink text" LOCATE , 30 PRINT "Change the palette. This" LOCATE , 30 PRINT "may be useful for other" LOCATE , 30 PRINT "special effects" Blinkagain: delay .5, k IF k > 0 THEN GOTO alldun PALETTE 7, 12 LOCATE 23, 30 delay .5, k IF k > 0 THEN GOTO alldun PALETTE 7, 63 GOTO Blinkagain alldun: SCREEN 0 WIDTH , 25 colours64 palet64 viewpalet64 PRINT PRINT " This is Screen 0" END REM -------- Cycles through all 99 colors using screen 12 ----------------- Quicklook99: SCREEN 12 colours99 palet99 CLS FOR i = 1 TO 99 PALETTE 0, palnum#(i) PRINT " "; i, HTML$(i); TAB(40); ShortName$(i) a$ = INPUT$(1) NEXT i END REM -------- Cycles through all 64 colors using screen 9 ----------------- Quicklook64: SCREEN 9 colours64 palet64 CLS FOR i = 0 TO 63 PALETTE 0, i PRINT " "; i, LongName$(i); TAB(40); ShortName$(i) a$ = INPUT$(1) NEXT i END SUB colours64 LongName$(0) = "black": ShortName$(0) = "black" LongName$(8) = "blue.midnight": ShortName$(8) = "midnight" LongName$(17) = "blue.beryl": ShortName$(17) = "beryl" LongName$(49) = "blue.bird": ShortName$(49) = "bird" LongName$(33) = "blue.steel": ShortName$(33) = "steel" LongName$(1) = "blue": ShortName$(1) = "blue" LongName$(41) = "blue.peacock": ShortName$(41) = "peacock" LongName$(9) = "blue.lily": ShortName$(9) = "lily" LongName$(25) = "blue.azure": ShortName$(25) = "azure" LongName$(57) = "blue.berry": ShortName$(57) = "berry" LongName$(11) = "blue.sky": ShortName$(11) = "sky" LongName$(43) = "blue.teal": ShortName$(43) = "teal" LongName$(59) = "blue.pansy": ShortName$(59) = "pansy" LongName$(31) = "blue.chrome": ShortName$(31) = "chrome" LongName$(27) = "blue.water": ShortName$(27) = "egg" LongName$(15) = "blue.icecube": ShortName$(15) = "icecube" LongName$(24) = "gray.khaki": ShortName$(24) = "khaki" LongName$(3) = "gray.cyan": ShortName$(3) = "cyan" LongName$(35) = "gray.ash": ShortName$(35) = "ash" LongName$(56) = "gray.smoke": ShortName$(56) = "smoke" LongName$(7) = "gray": ShortName$(7) = "gray" LongName$(42) = "green.celery": ShortName$(42) = "celery" LongName$(10) = "green.pine": ShortName$(10) = "pine" LongName$(2) = "green": ShortName$(2) = "green" LongName$(34) = "green.Leaf": ShortName$(34) = "Leaf" LongName$(16) = "green.kelly": ShortName$(16) = "kelly" LongName$(48) = "green.olive": ShortName$(48) = "olive" LongName$(18) = "green.pea": ShortName$(18) = "pea" LongName$(26) = "green.moss": ShortName$(26) = "moss" LongName$(58) = "green.lime": ShortName$(58) = "lime" LongName$(22) = "green.autumn": ShortName$(22) = "autumn" LongName$(50) = "green.neon": ShortName$(50) = "neon" LongName$(19) = "green.mint": ShortName$(19) = "mint" LongName$(51) = "green.aqua": ShortName$(51) = "aqua" LongName$(23) = "green.squash": ShortName$(23) = "squash" LongName$(13) = "lilac": ShortName$(13) = "lilac" LongName$(29) = "grape": ShortName$(29) = "grape" LongName$(45) = "purple": ShortName$(45) = "purple" LongName$(47) = "bubble.gum": ShortName$(47) = "gum" LongName$(61) = "purple.sunset": ShortName$(61) = "sunset" LongName$(5) = "magenta": ShortName$(5) = "magenta" LongName$(40) = "maroon": ShortName$(40) = "maroon" LongName$(21) = "tulip": ShortName$(21) = "tulip" LongName$(52) = "orange": ShortName$(52) = "orange" LongName$(60) = "peach": ShortName$(60) = "peach" LongName$(39) = "pink.flesh": ShortName$(39) = "flesh" LongName$(53) = "pink": ShortName$(53) = "pink" LongName$(37) = "fuchsia": ShortName$(37) = "fuchsia" LongName$(12) = "red.wine": ShortName$(12) = "wine" LongName$(28) = "red.Brick": ShortName$(28) = "Brick" LongName$(20) = "brown": ShortName$(20) = "brown" LongName$(32) = "red.rust": ShortName$(32) = "rust" LongName$(4) = "Red": ShortName$(4) = "Red" LongName$(36) = "red.cherry": ShortName$(36) = "cherry" LongName$(44) = "red.tomato": ShortName$(44) = "tomato" LongName$(55) = "manilla": ShortName$(55) = "manilla" LongName$(38) = "gold": ShortName$(38) = "gold" LongName$(46) = "sand": ShortName$(46) = "sand" LongName$(62) = "yellow": ShortName$(62) = "yellow" LongName$(54) = "lemon": ShortName$(54) = "lemon" LongName$(6) = "banana": ShortName$(6) = "banana" LongName$(30) = "yellow.daisy": ShortName$(30) = "daisy" LongName$(14) = "yellow.pumpkin": ShortName$(14) = "pumpkin" LongName$(63) = "white": ShortName$(63) = "white" END SUB DEFSNG Q SUB colours99 HTML$(1) = "Red": palnum#(1) = 63: ShortName$(1) = "red" HTML$(2) = "Green": palnum#(2) = 16128: ShortName$(2) = "green" HTML$(3) = "Blue": palnum#(3) = 4128768: ShortName$(3) = "blue" HTML$(4) = "Magenta": palnum#(4) = 4128831: ShortName$(4) = "magenta" HTML$(5) = "Cyan": palnum#(5) = 4144896: ShortName$(5) = "cyan" HTML$(6) = "Yellow": palnum#(6) = 16191: ShortName$(6) = "yellow" HTML$(7) = "White": palnum#(7) = 4144959: ShortName$(7) = "white" HTML$(8) = "Black": palnum#(8) = 0: ShortName$(8) = "black" HTML$(9) = "Aquamarine": palnum#(9) = 2373148: ShortName$(9) = "aqua" HTML$(10) = "Baker's Chocolate": palnum#(10) = 330775: ShortName$(10) = "cocoa" HTML$(11) = "Blue Violet": palnum#(11) = 2561831: ShortName$(11) = "violet" HTML$(12) = "Brass": palnum#(12) = 1059117: ShortName$(12) = "brass" HTML$(13) = "Bright Gold": palnum#(13) = 407094: ShortName$(13) = "gold" HTML$(14) = "Brown": palnum#(14) = 657961: ShortName$(14) = "brown" HTML$(15) = "Bronze": palnum#(15) = 1318435: ShortName$(15) = "bronze" HTML$(16) = "Bronze": palnum#(16) = 991017: ShortName$(16) = "bronze.1" HTML$(17) = "Cadet Blue": palnum#(17) = 2565911: ShortName$(17) = "cadet" HTML$(18) = "Cool Copper": palnum#(18) = 401718: ShortName$(18) = "penny" HTML$(19) = "Copper": palnum#(19) = 793646: ShortName$(19) = "copper" HTML$(20) = "Coral": palnum#(20) = 7999: ShortName$(20) = "coral" HTML$(21) = "Corn Flower Blue": palnum#(21) = 1773584: ShortName$(21) = "grape" HTML$(22) = "Dark Brown": palnum#(22) = 790551: ShortName$(22) = "toast" HTML$(23) = "Dark Green": palnum#(23) = 725771: ShortName$(23) = "pea" HTML$(24) = "Dark Green Copper": palnum#(24) = 1776914: ShortName$(24) = "fern" HTML$(25) = "Dark Olive Green": palnum#(25) = 725779: ShortName$(25) = "olive" HTML$(26) = "Dark Orchid": palnum#(26) = 3345446: ShortName$(26) = "orchid.1" HTML$(27) = "Dark Purple": palnum#(27) = 1967905: ShortName$(27) = "purple" HTML$(28) = "Dark Slate Blue": palnum#(28) = 2295834: ShortName$(28) = " " HTML$(29) = "Dark Tan": palnum#(29) = 1251877: ShortName$(29) = "tann.1" HTML$(30) = "Dark Turquoise": palnum#(30) = 3548188: ShortName$(30) = " " HTML$(31) = "Dark Wood": palnum#(31) = 1054497: ShortName$(31) = "wood" HTML$(32) = "Dusty Rose": palnum#(32) = 1579041: ShortName$(32) = "rose" HTML$(33) = "Feldspar": palnum#(33) = 1909812: ShortName$(33) = "rock" HTML$(34) = "Firebrick": palnum#(34) = 526371: ShortName$(34) = "brick" HTML$(35) = "Forest Green": palnum#(35) = 533256: ShortName$(35) = "forest" HTML$(36) = "Gold": palnum#(36) = 794419: ShortName$(36) = "gold" HTML$(37) = "Goldenrod": palnum#(37) = 1848886: ShortName$(37) = " " HTML$(38) = "Green Copper": palnum#(38) = 1908500: ShortName$(38) = " " HTML$(39) = "Green Yellow": palnum#(39) = 1848868: ShortName$(39) = " " HTML$(40) = "Hunter Green": palnum#(40) = 530184: ShortName$(40) = " " HTML$(41) = "Indian Red": palnum#(41) = 723731: ShortName$(41) = "indian" HTML$(42) = "Khaki": palnum#(42) = 1517351: ShortName$(42) = "khaki" HTML$(43) = "Light Blue": palnum#(43) = 3552816: ShortName$(43) = " " HTML$(44) = "Light Steel Blue": palnum#(44) = 3089187: ShortName$(44) = " " HTML$(45) = "Light Wood": palnum#(45) = 2699322: ShortName$(45) = " " HTML$(46) = "Lime Green": palnum#(46) = 799500: ShortName$(46) = "lime" HTML$(47) = "Mandarian Orange": palnum#(47) = 794169: ShortName$(47) = " " HTML$(48) = "Maroon": palnum#(48) = 1706019: ShortName$(48) = "maroon" HTML$(49) = "Medium Aquamarine": palnum#(49) = 2503436: ShortName$(49) = " " HTML$(50) = "Medium Blue": palnum#(50) = 3345420: ShortName$(50) = " " HTML$(51) = "Medium Forest Green": palnum#(51) = 533274: ShortName$(51) = "pine" HTML$(52) = "Medium Goldenrod": palnum#(52) = 2832954: ShortName$(52) = " " HTML$(53) = "Medium Orchid": palnum#(53) = 3546148: ShortName$(53) = " " HTML$(54) = "Medium Sea Green": palnum#(54) = 1055504: ShortName$(54) = " " HTML$(55) = "Medium Slate Blue": palnum#(55) = 4128799: ShortName$(55) = "slate" HTML$(56) = "Medium Spring Green": palnum#(56) = 16159: ShortName$(56) = "spring" HTML$(57) = "Medium Turquoise": palnum#(57) = 3552796: ShortName$(57) = " " HTML$(58) = "Medium Violet Red": palnum#(58) = 2366518: ShortName$(58) = " " HTML$(59) = "Medium Wood": palnum#(59) = 1646633: ShortName$(59) = " " HTML$(60) = "Midnight Blue": palnum#(60) = 1248011: ShortName$(60) = "midnight" HTML$(61) = "Navy Blue": palnum#(61) = 2295816: ShortName$(61) = "navy" HTML$(62) = "Neon Blue": palnum#(62) = 4133651: ShortName$(62) = " " HTML$(63) = "Neon Pink": palnum#(63) = 3218239: ShortName$(63) = "pink.hot" HTML$(64) = "New Midnight Blue": palnum#(64) = 2555904: ShortName$(64) = " " HTML$(65) = "New Tan": palnum#(65) = 2568506: ShortName$(65) = "tan.new" HTML$(66) = "Old Gold": palnum#(66) = 929075: ShortName$(66) = "gold.old" HTML$(67) = "Orange": palnum#(67) = 7999: ShortName$(67) = "orange" HTML$(68) = "Orange Red": palnum#(68) = 2367: ShortName$(68) = " " HTML$(69) = "Orchid": palnum#(69) = 3546166: ShortName$(69) = " " HTML$(70) = "Pale Green": palnum#(70) = 2305827: ShortName$(70) = "pea" HTML$(71) = "Pink": palnum#(71) = 2302767: ShortName$(71) = "pink" HTML$(72) = "Plum": palnum#(72) = 3812154: ShortName$(72) = "plum" HTML$(73) = "Quartz": palnum#(73) = 3946038: ShortName$(73) = "quartz" HTML$(74) = "Rich Blue": palnum#(74) = 2758166: ShortName$(74) = " " HTML$(75) = "Salmon": palnum#(75) = 1052699: ShortName$(75) = "salmon" HTML$(76) = "Scarlet": palnum#(76) = 328995: ShortName$(76) = "scarlet" HTML$(77) = "Sea Green": palnum#(77) = 1712904: ShortName$(77) = " " HTML$(78) = "Sweet Milo": palnum#(78) = 593946: ShortName$(78) = "milo" HTML$(79) = "Sienna": palnum#(79) = 530979: ShortName$(79) = "sienna" HTML$(80) = "Silver": palnum#(80) = 4078137: ShortName$(80) = "silver" HTML$(81) = "Sky Blue": palnum#(81) = 3352076: ShortName$(81) = "sky" HTML$(82) = "Slate Blue": palnum#(82) = 4136704: ShortName$(82) = " " HTML$(83) = "Spicy Pink": palnum#(83) = 2819903: ShortName$(83) = " " HTML$(84) = "Spring Green": palnum#(84) = 2047744: ShortName$(84) = " " HTML$(85) = "Steel Blue": palnum#(85) = 2300424: ShortName$(85) = " " HTML$(86) = "Summer Sky": palnum#(86) = 3615758: ShortName$(86) = " " HTML$(87) = "Tan": palnum#(87) = 1844278: ShortName$(87) = "tann" HTML$(88) = "Thistle": palnum#(88) = 3551030: ShortName$(88) = "thistle" HTML$(89) = "Turquoise": palnum#(89) = 3815979: ShortName$(89) = " " HTML$(90) = "Very Dark Brown": palnum#(90) = 790551: ShortName$(90) = "umber" HTML$(91) = "Violet": palnum#(91) = 1248019: ShortName$(91) = " " HTML$(92) = "Violet Red": palnum#(92) = 2493491: ShortName$(92) = " " HTML$(93) = "Wheat": palnum#(93) = 3094070: ShortName$(93) = "wheat" HTML$(94) = "Yellow Green": palnum#(94) = 799526: ShortName$(94) = " " HTML$(95) = "Dark Slate Grey": palnum#(95) = 1250059: ShortName$(95) = "smoke" HTML$(96) = "Dim Grey": palnum#(96) = 1381653: ShortName$(96) = " " HTML$(97) = "Very Light Grey": palnum#(97) = 3355443: ShortName$(97) = " " HTML$(98) = "Grey": palnum#(98) = 3158064: ShortName$(98) = "gray" HTML$(99) = "Light Grey": palnum#(99) = 2763306: ShortName$(99) = " " END SUB DEFINT Q SUB delay (n!, k) t! = TIMER + n! DO IF INKEY$ <> "" THEN k = 1 EXIT SUB END IF LOOP UNTIL TIMER > t! END SUB SUB MakePalet64 colours64 palet64 OPEN "palet64.bas" FOR OUTPUT AS #2 PRINT #2, "REM Created on "; DATE$; " at "; TIME$ FOR i = 0 TO 15 ktr = Palet(i) Colour$(i) = ShortName$(ktr) PRINT #2, "Palet("; i; ")="; Palet(i); PRINT #2, ":"; Colour$(i); "="; i; " "; PRINT #2, ":Colour$("; i; ")="; CHR$(34); ShortName$(ktr) NEXT i PRINT #2, "for i=0 to 15:palette i,Palet(I):next i" PRINT #2, "' Copy these two lines to the start of your program. Remove REM of course." PRINT #2, "REM COMMON SHARED "; FOR i = 0 TO 6: PRINT #2, Colour$(i); ","; NEXT i: PRINT #2, Colour$(7) PRINT #2, "REM COMMON SHARED "; FOR i = 8 TO 14: PRINT #2, Colour$(i); ","; NEXT i: PRINT #2, Colour$(15) CLOSE PRINT "PALET64.BAS has been written to disk." END SUB SUB makepalet99 colours99 OPEN "palet99.bas" FOR OUTPUT AS #2 PRINT #2, "REM Created on "; DATE$; " at "; TIME$ '========================================================================== FOR i = 0 TO 15 PRINT #2, "Palet("; i; ")="; Palet(i) NEXT i PRINT #2, FOR i = 0 TO 15: ktr = Palet(i) PRINT #2, "PALETTE("; i; ") , palnum#(Palet("; i; "))"; PRINT #2, ": Colour$("; i; ")="; CHR$(34); ShortName$(ktr); CHR$(34); ": "; PRINT #2, " "; ShortName$(ktr); " = "; i NEXT i PRINT #2, PRINT #2, "' Copy these two lines to the start of your program. Remove REM of course." PRINT #2, "REM COMMON SHARED "; FOR i = 0 TO 6: PRINT #2, ShortName$(Palet(i)); ","; NEXT i: PRINT #2, ShortName$(Palet(7)) PRINT #2, "REM COMMON SHARED "; FOR i = 8 TO 14: PRINT #2, ShortName$(Palet(i)); ","; NEXT i: PRINT #2, ShortName$(Palet(15)) CLOSE PRINT "PALET99.BAS has been written to disk." END SUB SUB palet64 REM Created on 06-09-2000 at 12:10:53 Palet(0) = 12: wine = 0: Colour$(0) = "wine" Palet(1) = 4: red = 1: Colour$(1) = "Red" Palet(2) = 14: pumpkin = 2: Colour$(2) = "pumpkin" Palet(3) = 46: sand = 3: Colour$(3) = "sand" Palet(4) = 8: midnight = 4: Colour$(4) = "midnight" Palet(5) = 61: sunset = 5: Colour$(5) = "sunset" Palet(6) = 9: lily = 6: Colour$(6) = "lily" Palet(7) = 52: orange = 7: Colour$(7) = "orange" Palet(8) = 38: gold = 8: Colour$(8) = "gold" Palet(9) = 36: cherry = 9: Colour$(9) = "cherry" Palet(10) = 18: pea = 10: Colour$(10) = "pea" Palet(11) = 54: lemon = 11: Colour$(11) = "lemon" Palet(12) = 19: mint = 12: Colour$(12) = "mint" Palet(13) = 30: daisy = 13: Colour$(13) = "daisy" Palet(14) = 28: Brick = 14: Colour$(14) = "Brick" Palet(15) = 63: white = 15: Colour$(15) = "white" FOR i = 0 TO 15: PALETTE i, Palet(i): NEXT i ' Copy these two lines to the start of your program. Remove REM of course. REM COMMON SHARED wine,Red,pumpkin,sand,midnight,sunset,lily,orange REM COMMON SHARED gold,cherry,pea,lemon,mint,daisy,Brick,white END SUB SUB palet99 REM Created on 06-09-2000 at 11:11:04 Palet(0) = 78 Palet(1) = 1 Palet(2) = 2 Palet(3) = 3 Palet(4) = 4 Palet(5) = 5 Palet(6) = 6 Palet(7) = 8 Palet(8) = 12 Palet(9) = 13 Palet(10) = 19 Palet(11) = 51 Palet(12) = 63 Palet(13) = 81 Palet(14) = 72 Palet(15) = 7 PALETTE (0), palnum#(Palet(0)): Colour$(0) = "milo": milo = 0 PALETTE (1), palnum#(Palet(1)): Colour$(1) = "red": red = 1 PALETTE (2), palnum#(Palet(2)): Colour$(2) = "green": green = 2 PALETTE (3), palnum#(Palet(3)): Colour$(3) = "blue": blue = 3 PALETTE (4), palnum#(Palet(4)): Colour$(4) = "magenta": magenta = 4 PALETTE (5), palnum#(Palet(5)): Colour$(5) = "cyan": cyan = 5 PALETTE (6), palnum#(Palet(6)): Colour$(6) = "yellow": yellow = 6 PALETTE (7), palnum#(Palet(7)): Colour$(7) = "black": black = 7 PALETTE (8), palnum#(Palet(8)): Colour$(8) = "brass": brass = 8 PALETTE (9), palnum#(Palet(9)): Colour$(9) = "gold": gold = 9 PALETTE (10), palnum#(Palet(10)): Colour$(10) = "copper": copper = 10 PALETTE (11), palnum#(Palet(11)): Colour$(11) = "pine": pine = 11 PALETTE (12), palnum#(Palet(12)): Colour$(12) = "pink.hot": pink.hot = 12 PALETTE (13), palnum#(Palet(13)): Colour$(13) = "sky": sky = 13 PALETTE (14), palnum#(Palet(14)): Colour$(14) = "plum": plum = 14 PALETTE (15), palnum#(Palet(15)): Colour$(15) = "white": white = 15 ' Copy these two lines to the start of your program. Remove REM of course. REM COMMON SHARED milo,red,green,blue,magenta,cyan,yellow,black REM COMMON SHARED brass,gold,copper,pine,pink.hot,sky,plum,white END SUB SUB ReadMe REM Every time I wanted to program using screen 12 or 13 I has to fire REM up a QB palette generation program or recycle colors from another REM program that were not exactly what I wanted. There are many good REM palette generation programs, some better than others but they all REM require you to enter the red, green and blue values then keep tweaking REM until you get the color you want. For me this is for the birds. I could REM never make a Gold color that looked correct. REM There had to be a better way. This is my better way. REM ---------- 99 colors in screen 12 and screen 13 ---------------------- REM HTML has a very large selections of colors, 256 colors to be exact. REM But who needs 256 colors? 99 colors are enough for me. I wanted to find REM a way of using these colors in QB. I found it and this is the result. REM The sub Palet99 loads the palette for screen 12 and screen 13 REM The sub Palet64 loads the palette for screen 0 and screen 9. REM The Sub Colors64 has data for the 64 colors used in screens 0 and 9. REM The Sub Colors99 has data for the 99 colors used in screens 12 and 13. REM IT is based on a table from REM http://www.webwheels.com/free/f082.htm REM There is a lot of color information here REM This WEB page was converted to text format then edited with QB4.5 REM The HTML hex code was converted to decimal using HEXDEC.BAS from REM http://www.basicguru.com/files/abc/abc9805/hexdec.bas REM A very useful program. REM If you decide to go this route download a page of HTML colors and REM try it, It's a little, well realy a lot of work. REM NOTE: The HTML colors use 256 shades while basic uses 64 shades. REM Some number crunching will be needed. This is not for beginners. REM But what the heck. It's good practice in using QB. REM HTML$ is the colorname defined in HTML. It does not realy REM belong in an array It's put here for future use. It's used in REM QuickLook. REM PalNum# is the palette color number. REM ShortName$ is my own creation. Change it if you wish. REM Using ShortName$ is an easy way to print or draw with colors. REM It's easier for me to use COLOR gold instead of COLOR 15 REM Not all HTML colors have short names, change or add to them as REM you wish. Just avoid duplicate names for the colors you use. REM A note: the same color can be given to more than one palette. This REM may be useful in some games, also you can change color assignments REM as your program runs. REM -----------64 colors in screen 0 and screen 9 ------------------------ REM QB has 64 colors assigned to 16 attributes but the colors are not REM defined. I have named the 64 colors, the names are mine and I'm REM sure that there are better names. The names attempt to define the REM color and are arranged by color (sort of). If you think of a better REM name or arrangement go for it. REM I used names for colors because it is easier to use names especially REM if the name describes the color. REM ----------------------------------------------------------------------- REM If you want to change a color go to the appropriate COLORS?? sub. REM Pick a color number then go to the PALET?? sub, change which palet you REM wish to that number. When you have the colors tuned to your liking REM run MakePalet?? sub. This can be run in the immediate mode. REM MakePalet?? will write a QB text file named PALET??.BAS to disk. REM Save your work. Gnomes sometimes eat programs. REM Edit Palet?? sub. Cut everything between SUB PALET?? and END SUB REM Merge PALET??.BAS into the sub. Don't forget to copy the common REM statements, they will let you call colors by name REM If you change a palet number the color name will not be correct REM but the colors will. MakePalet?? will fix that. REM ViewPalet?? sub will give a quick look at the colors. REM I have for the most part used discriptive names, this makes the REM program bulky but it is easier to follow and debug. There is no law REM against changing anything. Have fun and enjoy. REM Released to the public domain but if you use it credit would be nice. REM hcrichardson@earthlink.net END SUB SUB viewpalet64 colours64 LOCATE 1 PRINT COLOR 15 PRINT USING "####"; 0; Palet(0); : PRINT " "; PRINT ShortName$(Palet(i)); " Background" FOR i = 1 TO 15 Colour$(i) = ShortName$(Palet(i)) COLOR i PRINT USING "####"; i; Palet(i); : PRINT " "; Colour$(i) NEXT i END SUB SUB ViewPalet99 PRINT COLOR 15 PRINT " 0", Colour$(0); " Background" FOR i = 2 TO 15 COLOR i PRINT i, Colour$(i) NEXT i END SUB