256 color palette

BlitzPlus Forums/BlitzPlus Programming/256 color palette

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

For the past two hours, I've been trying to write an algorithm to make a 8-bit color palette. I have failed. Could someone write one for me? Or could someone give me a good image of an 8-bit palette?

I'm using panels and SetPanelColor(). This is the array of panels:

Dim hPalette(256)

And I need each one filled with a certain color. There are 32 rows and 8 columns. I'm not really good at mixing colors... and this is the best I could come up with:

For p=0 To 85
	SetPanelColor(hPalette(p),colr,colg,colb)
	colr=colr+3
Next
colr=0
For p=86 To 170
	SetPanelColor(hPalette(p),colr,colg,colb)
	colg=colg+3
Next
colg=0
For p=170 To 256
	SetPanelColor(hPalette(p),colr,colg,colb)
	colb=colb+3
Next