Discard dark colors / dark background for drafts

This commit is contained in:
M66B 2021-03-22 15:12:44 +01:00
parent c44c232d88
commit fecd64c25c
1 changed files with 7 additions and 0 deletions

View File

@ -543,6 +543,13 @@ public class HtmlHelper {
continue;
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)
element.removeAttr("color");
else {