This commit is contained in:
parent
b96abd5416
commit
cab1fd815c
1 changed files with 7 additions and 0 deletions
|
@ -220,6 +220,13 @@ public class Algorithms {
|
|||
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) +
|
||||
colorString.charAt(2) + colorString.charAt(2) +
|
||||
colorString.charAt(3) + colorString.charAt(3);
|
||||
|
||||
}
|
||||
if (colorString.length() == 7) {
|
||||
// Set the alpha value
|
||||
color |= 0x00000000ff000000;
|
||||
|
|
Loading…
Reference in a new issue