Пример #1
0
 public static int getTextColorForSelectedVerse(final int selectedVerseBgColor) {
   if (ColorUtils.calculateLuminance(selectedVerseBgColor) > 0.4) {
     return 0xff000000;
   } else {
     return 0xffffffff;
   }
 }
 private static boolean isLightColor(@ColorInt int color) {
   return ColorUtils.calculateLuminance(color) > 0.5f;
 }