mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-04 06:20:26 +00:00
More icon colors variation
This commit is contained in:
parent
ebc4176a00
commit
56a2de7bb7
1 changed files with 4 additions and 6 deletions
|
@ -70,8 +70,8 @@ class ImageHelper {
|
|||
static Bitmap generateIdenticon(@NonNull String email, int size, int pixels, boolean dark) {
|
||||
byte[] hash = getHash(email);
|
||||
|
||||
int color = Color.argb(255, hash[0], hash[1], hash[2]);
|
||||
color = Helper.adjustLuminance(color, dark, MIN_LUMINANCE);
|
||||
int c = email.hashCode() & 0xffffff | 0xff000000;
|
||||
int color = Helper.adjustLuminance(c, dark, MIN_LUMINANCE);
|
||||
|
||||
Paint paint = new Paint();
|
||||
paint.setColor(color);
|
||||
|
@ -107,10 +107,8 @@ class ImageHelper {
|
|||
if (text == null)
|
||||
return null;
|
||||
|
||||
byte[] hash = getHash(email);
|
||||
|
||||
int color = Color.argb(255, hash[0], hash[1], hash[2]);
|
||||
color = Helper.adjustLuminance(color, dark, MIN_LUMINANCE);
|
||||
int c = email.hashCode() & 0xffffff | 0xff000000;
|
||||
int color = Helper.adjustLuminance(c, dark, MIN_LUMINANCE);
|
||||
|
||||
Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
|
||||
Canvas canvas = new Canvas(bitmap);
|
||||
|
|
Loading…
Reference in a new issue