Can someone point me to a good hexidecimal-decimal conversion function?

essentially, i need to translate a hex string ex. "a1b2c3" into an RGB vector dynamically. these are not programmed numbers, but entered data; so the conversion must be done during runtime, which is why i'm looking for a function rather than converting them myself.