OK, try code below. It should output 7 boxes along the top using one method of outputting boxes, and then another row of boxes using another method. On my pc the colour order is red, green, blue, yellow, magenta, cyna, white. Code is scalable. Just keep adding colours and change variable at top.
If colours are coming out wrong then your graphics card probably needs updated drivers. Also, make sure you are running in 32bit colour mode as 16bit colour mode sometimes outputs wrong colours.
tilecount=7
dim tile(tilecount) as dword
` read colours into array
restore
for f=1 to tilecount
read r,g,b
tile(f)=rgb(r,g,b)
next f
` method 1
for f=1 to tilecount
box (f-1)*16,0,f*16,16,tile(f),tile(f),tile(f),tile(f)
next f
` method 2
for f=1 to tilecount
ink tile(f),0
box (f-1)*16,32,f*16,48
next f
wait key
data 255,0,0
data 0,255,0
data 0,0,255
data 255,255,0
data 255,0,255
data 0,255,255
data 255,255,255
Boo!