> I think maybe I should have explained this in more detail.  
> 
> If you want to specify the color as a number, you have to arrange for 
> red to be in the bottom (least significant) 8 bits, green next, then 
> blue.  There are 32 bits altogether so the top 8 bits are unused and 
> can be left zero in this context.
> 
> If you specify the color number directly, the easiest way is to use 
> hexadecimal notation (Base 16 notation), which in PowerPro is 
> signalled by 0x in front of the number.  
> Red 156 is not 156 in hexadecimal; it's 128+16+8+4= (binary) 1001 
> 1100 = 0x9C;
> 
> Similary 67 = 64+2+1 = 0010 0011 = 0x43
> 
> So the rbg  you'd want is 0x00679c
> where I have put the 00 for blue in too just to be explicit.
> 
> As Sheri says, you can use inputcolor to show the decimal equivalent 
> or win.hex(inputcolor) will show the hex.  Windows Calc, scientific 
> view, can also convert.
> 
> 
> If you have r, g, b, separately in variables, you can compute the rgb 
> single number as
> rgb = r + (g*256) + (b*256*256)
> the shift operators shown above do the same calculation -- shift of 8 
> is same as multiply by 256.

Great explanation, even I could follow that. Of course, following it, 
and figuring it out/working with it....two entirely different skillsets ;)

Thank you Sheri: David likie win.debug(inputcolor) for mere mortal usage
! ;D

David Troesch  |  Atlanta, GA  |  ICQ# 2333123
Words of wisdom: Never buy a "One of a kind" item at a "2-for-1" sale!
Funstuff: "Do, or do not. There is no try."

Reply via email to