Encode black without alpha

pull/194/merge
M66B 3 years ago
parent 1b5863ff2b
commit aea2786af7

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

Loading…
Cancel
Save