Encode black without alpha

This commit is contained in:
M66B 2021-12-23 07:50:13 +01:00
parent 1b5863ff2b
commit aea2786af7
1 changed files with 1 additions and 1 deletions

View File

@ -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);