Good afternoon everyone
I'm stuck trying to convert a uint color value to its equivalent argb hex format. Basically, I am trying to convert a color from Flex (AS3) to the corresponding kml color, which is in the argb hex format from what I am collecting. Below is my function as it is now. Although it converts to a valid kml color, it is not the right color or even close. Does anyone see something wrong here?
private static function getKmlColor(color:uint,alpha:Number):String
{
var argb:uint = 0;
var alphaUint:uint = 255 * alpha;
argb += (alphaUint<<24);
argb += (color);
return argb.toString(16);
}
source
share