Decode transparent colors

pull/174/head
M66B 5 years ago
parent cb66108b44
commit bc36487d33

@ -817,7 +817,7 @@ public class HtmlHelper {
if (x11ColorMap.containsKey(code)) // workaround if (x11ColorMap.containsKey(code)) // workaround
color = x11ColorMap.get(code); color = x11ColorMap.get(code);
else else
color = Integer.decode(c); color = Long.decode(c).intValue();
} }
} else if (c.startsWith("rgb") || c.startsWith("hsl")) { } else if (c.startsWith("rgb") || c.startsWith("hsl")) {
int s = c.indexOf("("); int s = c.indexOf("(");
@ -851,7 +851,7 @@ public class HtmlHelper {
color = Color.parseColor(c); color = Color.parseColor(c);
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
// Workaround // Workaround
color = Integer.decode("#" + c); color = Long.decode("#" + c).intValue();
} }
if (BuildConfig.DEBUG) if (BuildConfig.DEBUG)

Loading…
Cancel
Save