I posted recently what I thought a bug in reading a colour value:
http://forum.thegamecreators.com/?m=forum_view&t=190061&b=15
so, I sat this evening to see what\'s going on, and I managed to know how to create transparent colours. am not new to DBpro but I just found out the following:
Quote: "colour=RGB(any,any,any)-ALPHA*16777215"
where \"ALPHA\" is the transparency value between 0,255.
the bigger the \"ALPHA\" is, the more transparent the colour.
here you go a simple code. I hope you enjoy this information:
do
cls
randomcolor=rgb(rnd(255),rnd(255),rnd(255))
c1=randomcolor
c2=randomcolor-50*16777215
c3=randomcolor-100*16777215
c4=randomcolor-150*16777215
c5=randomcolor-200*16777215
c6=randomcolor-220*16777215
set cursor 0,0 : print \"Red= \",rgbr(randomcolor)
set cursor 100,0 : print \"Green= \",rgbg(randomcolor)
set cursor 200,0 : print \"Blue= \",rgbb(randomcolor)
box 20,20,280,400 `just a white box
box 50,50,250,100,c1,c1,c1,c1 : set cursor 290,75 : print \"ALPHA=0\"
box 50,105,250,155,c2,c2,c2,c2 : set cursor 290,125 : print \"ALPHA=50\"
box 50,160,250,210,c3,c3,c3,c3 : set cursor 290,180 : print \"ALPHA=100\"
box 50,215,250,265,c4,c4,c4,c4 : set cursor 290,230 : print \"ALPHA=150\"
box 50,270,250,325,c5,c5,c5,c5 : set cursor 290,290 : print \"ALPHA=200\"
box 50,330,250,385,c6,c6,c6,c6 : set cursor 290,345 : print \"ALPHA=220\"
set cursor 20,400
print \"Press space key to change colour\"
wait key
loop