From bc36487d33961a709f3a283ce7391a1c82d87c25 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 15 Feb 2020 20:05:12 +0100 Subject: [PATCH] Decode transparent colors --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 81b758b85e..71d303c70c 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -817,7 +817,7 @@ public class HtmlHelper { if (x11ColorMap.containsKey(code)) // workaround color = x11ColorMap.get(code); else - color = Integer.decode(c); + color = Long.decode(c).intValue(); } } else if (c.startsWith("rgb") || c.startsWith("hsl")) { int s = c.indexOf("("); @@ -851,7 +851,7 @@ public class HtmlHelper { color = Color.parseColor(c); } catch (IllegalArgumentException ex) { // Workaround - color = Integer.decode("#" + c); + color = Long.decode("#" + c).intValue(); } if (BuildConfig.DEBUG)