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:
parent
1d864b21bb
commit
403fbcc8a7
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue