Julian Parker wrote:

> I remember seeing something about this topic not to long ago but have been
> unable to find the dialogue about it and am a little pressed for time. Is
> anyone able to tell me how to do such a conversion, or even better point me
> in the direction of a tool that will assist me with such a conversion?

A hex color value is a base-16 number of 6 digits. The first two
digits represent the amount of red, the second two are the green
and the last two are the blue. Any two-digit hex values
represents values between 00 to FF, or 0 to 255 in decimal. So a
color like &H800080 has &H80 red, 0 green and &H80 blue. &H80 is
128 in decimal (8*16 + 0). To get the RGB value as a single
number multiply the red by 256^2 (65536) plus the green times 256
plus the blue, which is 8388736, or deep purple.

You could also convert the base-16 number &H800080 directly to
decimal like so:
n = 8*16^5 + 0*16^4 + 0*16^3 + 0*16^2 + 8*16^1 + 0*16^0

-- 
- Bill Thoen
------------------------------------------------------------ 
GISnet, 1401 Walnut St., Suite C, Boulder, CO  80302
tel: 303-786-9961, fax: 303-443-4856
mailto:[EMAIL PROTECTED], http://www.gisnet.com/
------------------------------------------------------------

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4277

Reply via email to