Alex, I think this question is for you since I think you wrote the code last
July.
The handling of rgba seems odd to me:
else if ((c = stringValue.indexOf("rgba(")) != -1)
{
c2 = stringValue.indexOf(")");
stringValue = stringValue.substring(c + 4, c2);
var parts4:Array = stringValue.split(",");
return (uint(parts4[3]) << 24 +
uint(parts3[0]) << 16 +
uint(parts3[1]) << 8 +
uint(parts3[2]));
}
Besides a typo where parts3 is being used instead of parts4, there’s two issues
I can see:
1. The uint is being saved as ARGB rather than RGBA.
2. RGB values are values between 0 and 255, while A values are between 0 and 1.
It does not look to me like this code ever worked. Any objection to me changing
it to standardize on RGBA instead of ARGB?
Thanks,
Harbs