mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-28 22:39:50 +00:00
3.2.3
- Improved Setup Wizard. - Improved Home. - Fixed some issues on devices without Google apps installed. - The text color of dialog buttons will automatically change to white on devices with custom dynamic colors. - Tiny Vterm will now close itself when using the exit command.
This commit is contained in:
parent
373388b0d0
commit
9178a544d9
20 changed files with 1424 additions and 1468 deletions
|
|
@ -505,4 +505,14 @@ public class UIUtils {
|
|||
int nightMode = AppCompatDelegate.getDefaultNightMode();
|
||||
return nightMode == AppCompatDelegate.MODE_NIGHT_YES;
|
||||
}
|
||||
|
||||
public static boolean isColorLight(int color) {
|
||||
int r = (color >> 16) & 0xFF;
|
||||
int g = (color >> 8) & 0xFF;
|
||||
int b = color & 0xFF;
|
||||
|
||||
double luminance = 0.299 * r + 0.587 * g + 0.114 * b;
|
||||
return luminance > 186;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue