mirror of https://github.com/M66B/FairEmail.git
Discard dark colors / dark background for drafts
This commit is contained in:
parent
c44c232d88
commit
fecd64c25c
|
@ -543,6 +543,13 @@ public class HtmlHelper {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Integer color = parseColor(value);
|
Integer color = parseColor(value);
|
||||||
|
|
||||||
|
if (color != null && !view && Helper.isDarkTheme(context)) {
|
||||||
|
float lum = (float) ColorUtils.calculateLuminance(color);
|
||||||
|
if (lum < 0.1f)
|
||||||
|
color = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (color == null)
|
if (color == null)
|
||||||
element.removeAttr("color");
|
element.removeAttr("color");
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue