@@ -148,10 +148,10 @@ else if (obj instanceof ValueWrapper) {
148148 } else if (type == AXmlConstants .TYPE_INT_COLOR_ARGB4 ) {
149149 if (obj instanceof Integer ) {
150150 int color = (Integer ) obj ;
151- int b = color & 0x000F ;
152- int g = (color & 0x00F0 ) >> 4 ;
153- int r = (color & 0x0F00 ) >> 8 ;
154- int a = (color & 0xF000 ) >> 12 ;
151+ int b = color & 0x000F << 4 ;
152+ int g = (color & 0x00F0 );
153+ int r = (color & 0x0F00 ) >> 4 ;
154+ int a = (color & 0xF000 ) >> 8 ;
155155 AXmlColorValue colorVal = new AXmlColorValue (a , r , g , b );
156156 this .node .addAttribute (
157157 new AXmlAttribute <AXmlColorValue >(tname , resourceId , type , colorVal , ns , false ));
@@ -171,9 +171,9 @@ else if (obj instanceof ValueWrapper) {
171171 } else if (type == AXmlConstants .TYPE_INT_COLOR_RGB4 ) {
172172 if (obj instanceof Integer ) {
173173 int color = (Integer ) obj ;
174- int b = color & 0x000F ;
175- int g = (color & 0x00F0 ) >> 4 ;
176- int r = (color & 0x0F00 ) >> 8 ;
174+ int b = color & 0x000F << 4 ;
175+ int g = (color & 0x00F0 );
176+ int r = (color & 0x0F00 ) >> 4 ;
177177 AXmlColorValue colorVal = new AXmlColorValue (r , g , b );
178178 this .node .addAttribute (
179179 new AXmlAttribute <AXmlColorValue >(tname , resourceId , type , colorVal , ns , false ));
0 commit comments