RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
Any QBasic color experts in the house?
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
Scrim
Mandrake's Little Slap Bitch


Joined: 05 Apr 2007
Posts: 69
Location: Canada

PostPosted: Sat Sep 22, 2007 5:29 pm    Post subject: Any QBasic color experts in the house? [quote]

When I was a kid I wrote a pixel art program in Qbasic. Because I didn't know anything about file formats, the program's save files were simply a text file with a long list of numbers, where each number was the "color number" of 1 pixel of the image.

On a whim, I decided it'd be nice to save some of the old artwork that me and a friend made with my drawing program in some modern file format (i.e., png), and wrote a program to do that.

Only problem is, I don't know how to convert QBasic's default 256 color pallet for Screen mode 13 into RGB color codes, and I've not had much luck with google. Alas, I don't have a computer that actually runs QBasic anymore, so I can't play around with it and figure it out that way. All I have to go on is a really vague recollection of what it looked like when you drew dots in all 256 colors in order. So far I haven't hit on it through trial and error...

Can anyone point me to some info on how the QBasic colors were ordered?
Back to top  
BadMrBox
Bringer of Apocalypse


Joined: 26 Jun 2002
Posts: 1022
Location: Dark Forest's of Sweden

PostPosted: Sat Sep 22, 2007 7:07 pm    Post subject: [quote]


You could always convert your old sourcecode to Freebasic quite easily and from there save your screen as bmp or png.
_________________
Back to top  
Scrim
Mandrake's Little Slap Bitch


Joined: 05 Apr 2007
Posts: 69
Location: Canada

PostPosted: Sat Sep 22, 2007 8:31 pm    Post subject: [quote]

Thanks, with the help of your image and another one I found, it looks like I cracked it, or at least got really really close. Here's a screenshot from my little converter utility showing a dwarf warrior and the default palette.



For future reference for anyone in the same boat, here are the RGB values for the QBasic Screen 13 default colours that I figured out (there aren't actually 256 - the last few are just black):

0: (0,0,0)
1: (0,0,170)
2: (0,170,0)
3: (0,170,170)
4: (170,0,0)
5: (170,0,170)
6: (170,85,0)
7: (170,170,170)
8: (85,85,85)
9: (85,85,255)
10: (85,255,85)
11: (85,255,255)
12: (255,85,85)
13: (255,85,255)
14: (255,255,85)
15: (255,255,255)
16: (15,15,15)
17: (31,31,31)
18: (47,47,47)
19: (63,63,63)
20: (79,79,79)
21: (95,95,95)
22: (111,111,111)
23: (127,127,127)
24: (143,143,143)
25: (159,159,159)
26: (175,175,175)
27: (191,191,191)
28: (207,207,207)
29: (223,223,223)
30: (239,239,239)
31: (255,255,255)
32: (0,0,255)
33: (64,0,255)
34: (128,0,255)
35: (192,0,255)
36: (255,0,255)
37: (255,0,191)
38: (255,0,127)
39: (255,0,63)
40: (255,0,0)
41: (255,64,0)
42: (255,128,0)
43: (255,192,0)
44: (255,255,0)
45: (191,255,0)
46: (127,255,0)
47: (63,255,0)
48: (0,255,0)
49: (0,255,64)
50: (0,255,128)
51: (0,255,192)
52: (0,255,255)
53: (0,191,255)
54: (0,127,255)
55: (0,63,255)
56: (128,128,255)
57: (160,128,255)
58: (192,128,255)
59: (224,128,255)
60: (255,128,255)
61: (255,128,223)
62: (255,128,191)
63: (255,128,159)
64: (255,128,128)
65: (255,160,128)
66: (255,192,128)
67: (255,224,128)
68: (255,255,128)
69: (223,255,128)
70: (191,255,128)
71: (159,255,128)
72: (128,255,128)
73: (128,255,160)
74: (128,255,192)
75: (128,255,224)
76: (128,255,255)
77: (128,223,255)
78: (128,191,255)
79: (128,159,255)
80: (192,192,255)
81: (208,192,255)
82: (224,192,255)
83: (240,192,255)
84: (255,192,255)
85: (255,192,239)
86: (255,192,223)
87: (255,192,207)
88: (255,192,192)
89: (255,208,192)
90: (255,224,192)
91: (255,240,192)
92: (255,255,192)
93: (239,255,192)
94: (223,255,192)
95: (207,255,192)
96: (192,255,192)
97: (192,255,208)
98: (192,255,224)
99: (192,255,240)
100: (192,255,255)
101: (192,239,255)
102: (192,223,255)
103: (192,207,255)
104: (0,0,128)
105: (32,0,128)
106: (64,0,128)
107: (96,0,128)
108: (128,0,128)
109: (128,0,96)
110: (128,0,64)
111: (128,0,32)
112: (128,0,0)
113: (128,32,0)
114: (128,64,0)
115: (128,96,0)
116: (128,128,0)
117: (96,128,0)
118: (64,128,0)
119: (32,128,0)
120: (0,128,0)
121: (0,128,32)
122: (0,128,64)
123: (0,128,96)
124: (0,128,128)
125: (0,96,128)
126: (0,64,128)
127: (0,32,128)
128: (64,64,128)
129: (80,64,128)
130: (96,64,128)
131: (112,64,128)
132: (128,64,128)
133: (128,64,112)
134: (128,64,96)
135: (128,64,80)
136: (128,64,64)
137: (128,80,64)
138: (128,96,64)
139: (128,112,64)
140: (128,128,64)
141: (112,128,64)
142: (96,128,64)
143: (80,128,64)
144: (64,128,64)
145: (64,128,80)
146: (64,128,96)
147: (64,128,112)
148: (64,128,128)
149: (64,112,128)
150: (64,96,128)
151: (64,80,128)
152: (64,80,128)
153: (72,80,128)
154: (80,80,128)
155: (88,80,128)
156: (128,80,128)
157: (128,80,120)
158: (128,80,112)
159: (128,80,104)
160: (128,64,80)
161: (128,72,80)
162: (128,80,80)
163: (128,88,80)
164: (128,128,80)
165: (120,128,80)
166: (112,128,80)
167: (104,128,80)
168: (80,128,64)
169: (80,128,72)
170: (80,128,80)
171: (80,128,88)
172: (80,128,128)
173: (80,120,128)
174: (80,112,128)
175: (80,104,128)
176: (0,0,64)
177: (16,0,64)
178: (32,0,64)
179: (48,0,64)
180: (64,0,64)
181: (64,0,48)
182: (64,0,32)
183: (64,0,16)
184: (64,0,0)
185: (64,16,0)
186: (64,32,0)
187: (64,48,0)
188: (64,64,0)
189: (48,64,0)
190: (32,64,0)
191: (16,64,0)
192: (0,64,0)
193: (0,64,16)
194: (0,64,32)
195: (0,64,48)
196: (0,64,64)
197: (0,48,64)
198: (0,32,64)
199: (0,16,64)
200: (32,32,64)
201: (40,32,64)
202: (48,32,64)
203: (56,32,64)
204: (64,32,64)
205: (64,32,56)
206: (64,32,48)
207: (64,32,40)
208: (64,32,32)
209: (64,40,32)
210: (64,48,32)
211: (64,56,32)
212: (64,64,32)
213: (56,64,32)
214: (48,64,32)
215: (40,64,32)
216: (32,64,32)
217: (32,64,40)
218: (32,64,48)
219: (32,64,56)
220: (32,64,64)
221: (32,56,64)
222: (32,48,64)
223: (32,40,64)
224: (48,48,64)
225: (52,48,64)
226: (56,48,64)
227: (60,48,64)
228: (64,48,64)
229: (64,48,60)
230: (64,48,56)
231: (64,48,52)
232: (64,48,48)
233: (64,52,48)
234: (64,56,48)
235: (64,60,48)
236: (64,64,48)
237: (60,64,48)
238: (56,64,48)
239: (52,64,48)
240: (48,64,48)
241: (48,64,52)
242: (48,64,56)
243: (48,64,60)
244: (48,64,64)
245: (48,60,64)
246: (48,56,64)
247: (48,52,64)
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum