mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
Fixed dull generated icons
This commit is contained in:
@@ -45,7 +45,6 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.core.text.HtmlCompat;
|
||||
import androidx.core.util.PatternsCompat;
|
||||
import androidx.preference.PreferenceManager;
|
||||
@@ -211,11 +210,7 @@ public class HtmlHelper {
|
||||
}
|
||||
|
||||
if (color != null) {
|
||||
float lum = (float) ColorUtils.calculateLuminance(color);
|
||||
if (dark ? lum < MIN_LUMINANCE : lum > 1 - MIN_LUMINANCE)
|
||||
color = ColorUtils.blendARGB(color,
|
||||
dark ? Color.WHITE : Color.BLACK,
|
||||
dark ? MIN_LUMINANCE - lum : lum - (1 - MIN_LUMINANCE));
|
||||
color = Helper.adjustLuminance(color, dark, MIN_LUMINANCE);
|
||||
c = String.format("#%06x", color & 0xFFFFFF);
|
||||
sb.append("color:").append(c).append(";");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user