1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 05:34:51 +00:00

Fixed black text on white background override

This commit is contained in:
M66B 2024-10-21 19:26:11 +02:00
parent 1d864b21bb
commit 403fbcc8a7

View file

@ -801,8 +801,11 @@ public class HtmlHelper {
} }
} }
if (color != null) if (color != null) {
element.attr("x-color", "true"); double lum = ColorUtils.calculateLuminance(color);
if (dark ? lum > 1 - MIN_LUMINANCE_VIEW : lum < MIN_LUMINANCE_VIEW)
element.attr("x-color", "true");
}
} else /* background */ { } else /* background */ {
if (color != null && !hasColor(color)) if (color != null && !hasColor(color))
color = Color.TRANSPARENT; color = Color.TRANSPARENT;