[Tutor] Getting hex value of pixels

Michael Miller blackmariah@shmups.com
Fri Jan 31 07:57:01 2003


> Hex values aren't different than decimal values, they are just
> presented differently... I guess you want something like this:
>  >>> "#%02X%02X%02X" % (55, 200, 255)
>
> '#37C8FF'
>

Okay, now would you mind explaining how that works? LOL Messing with it I see 
that just using "%02X" % (55) produces the expected output of 37. What is 
"%02X" doing, anyway? Thanks a lot for helping out.