public static function webColor2Uint(color:String):uint { var uintColor:uint; if (color.indexOf("#") != -1) { var r:RegExp=new RegExp(/#/g); uintColor = uint(String(color).replace(r, "0x")); } else if (color.indexOf("0x") != -1) { uintColor = uint(color); } return uintColor; }