Victor Shcherb 2015-10-05 22:21:27 +03:00
parent cab1fd815c
commit af747fbbec

View file

@ -219,7 +219,6 @@ public class Algorithms {
public static int parseColor(String colorString) {
if (colorString.charAt(0) == '#') {
// Use a long to avoid rollovers on #ffXXXXXX
long color = Long.parseLong(colorString.substring(1), 16);
if (colorString.length() == 4) {
colorString = "#" +
colorString.charAt(1) + colorString.charAt(1) +
@ -227,6 +226,7 @@ public class Algorithms {
colorString.charAt(3) + colorString.charAt(3);
}
long color = Long.parseLong(colorString.substring(1), 16);
if (colorString.length() == 7) {
// Set the alpha value
color |= 0x00000000ff000000;