Alpha should be in range 0 to 1
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5f43ec5f Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5f43ec5f Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5f43ec5f Branch: refs/heads/develop Commit: 5f43ec5fab821fabffcf998cc1d95598f8a236c9 Parents: 4eaa69e Author: Justin Mclean <jmcl...@apache.org> Authored: Sun Mar 5 11:53:49 2017 +1100 Committer: Justin Mclean <jmcl...@apache.org> Committed: Sun Mar 5 11:53:49 2017 +1100 ---------------------------------------------------------------------- .../src/main/flex/org/apache/flex/utils/CSSUtils.as | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5f43ec5f/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as index 72abe6e..2102acd 100644 --- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as +++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as @@ -139,19 +139,21 @@ package org.apache.flex.utils stringValue = stringValue.substring(c + 4, c2); var parts3:Array = stringValue.split(","); return (0xFF000000 + - uint(parts3[0]) << 16 + - uint(parts3[1]) << 8 + + (uint(parts3[0]) << 16) + + (uint(parts3[1]) << 8) + uint(parts3[2])); } else if ((c = stringValue.indexOf("rgba(")) != -1) { c2 = stringValue.indexOf(")"); - stringValue = stringValue.substring(c + 4, c2); + stringValue = stringValue.substring(c + 5, c2); var parts4:Array = stringValue.split(","); - return (uint(parts4[3]) << 24 + - uint(parts3[0]) << 16 + - uint(parts3[1]) << 8 + - uint(parts3[2])); + parts4[3] *= 255; // range is 0 to 1 + + return ((uint(parts4[3]) << 24) + + (uint(parts4[0]) << 16) + + (uint(parts4[1]) << 8) + + uint(parts4[2])); } if (colorMap.hasOwnProperty(stringValue))