that would work for a regular hex number, but not for an RGB color code. The color code is broken up into 3 distinct values, one for Red, One for Green, and one for Blue. The values are from 00 to FF for each.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of James MacFarlane Sent: Friday, August 09, 2002 3:08 PM To: Multiple recipients of list witango-talk Subject: RE: Witango-Talk: [OT] Hexadecimal number to decimal conversion.... Starting from the least significant digit, a9f695 is: 5 + 9 * 16^1 + 6 * 16^2 + 15(F=15) * 16^3 + 9 * 16 ^4 + 10(A=10) * 16 ^ 6 You can just loop through the length of the string and apply the power of 16 to the position of the character in the string+1. You'll need to convert A-F to 10-15, so you might want to make a decimal-to-hex array for store the conversion values. - James -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Pamental Sent: Friday, August 09, 2002 1:33 PM To: Multiple recipients of list witango-talk Subject: Witango-Talk: [OT] Hexadecimal number to decimal conversion.... Hey guys, Anyone have a way to convert hexadecimal to a decimal number? (converting a color code '#a9f695' to the decimal equivalent? Thanks! Jason -- ____________________________________________________________________ Jason Pamental, President [EMAIL PROTECTED] Bathysphere Digital Media Services, Inc. http://bathyspheredms.com ____________________________________________________________________ Tel: 401.490.6830 Fax: 401.490.6831 ________________________________________ A North American Distributor for Witango (http://www.witango.com) Rapid Web Application Development - XML Execution Engine ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body
