I am sending a var to Flash:
// incoming
var pageColor:String = "rgb(81, 89, 112)";
I have this function to covert the RGB values to a HEX
function rgb2hex(r:Number, g:Number, b:Number) {
return '0x'+(r << 16 | g << 8 | b).toString(16).toUpperCase();
}
// trace(rgb2hex(81, 89, 112));
Now I am looking for the best way to extract the numbers from the pageColor String and use them in the rgb2hex function..