From 97ad2e7ff5da44395ba497cf5ae9649943440202 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 23 Dec 2021 07:50:13 +0100 Subject: [PATCH] Encode black without alpha --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index b4700120d7..2e9132aac3 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -1772,7 +1772,7 @@ public class HtmlHelper { static String encodeWebColor(int color) { int alpha = Color.alpha(color); int rgb = 0xFFFFFF & color; - if (alpha == 255) + if (alpha == 255 || rgb == 0) return String.format("#%06X", rgb); else return String.format("#%06X%02X", rgb, alpha);