Loading QKSMS/src/main/java/com/moez/QKSMS/common/CIELChEvaluator.java +9 −0 Original line number Diff line number Diff line Loading @@ -18,7 +18,13 @@ public class CIELChEvaluator implements TypeEvaluator<Integer> { private final ColorCIELCh mStartColor; private final ColorCIELCh mEndColor; private final int mStartInt; private final int mEndInt; public CIELChEvaluator(int startColor, int endColor) { mStartInt = startColor; mEndInt = endColor; mStartColor = convertRgbToCIELCH(startColor); mEndColor = convertRgbToCIELCH(endColor); } Loading @@ -29,6 +35,9 @@ public class CIELChEvaluator implements TypeEvaluator<Integer> { @Override public Integer evaluate(float fraction, Integer ignored, Integer ignored2) { if (mStartInt == mEndInt) { return mStartInt; } // CIELCH to CIELAB double L = mStartColor.L * (1 - fraction) + mEndColor.L * fraction; Loading QKSMS/src/main/java/com/moez/QKSMS/ui/ThemeManager.java +4 −2 Original line number Diff line number Diff line Loading @@ -621,9 +621,11 @@ public class ThemeManager { } public static void setActiveColor(int color) { if (mActiveColor != color) { mActiveColor = color; LiveViewManager.refreshViews(QKPreference.THEME); } } private static boolean isColorDarkEnough(int color) { for (int i = 0; i < COLORS.length; i++) { Loading Loading
QKSMS/src/main/java/com/moez/QKSMS/common/CIELChEvaluator.java +9 −0 Original line number Diff line number Diff line Loading @@ -18,7 +18,13 @@ public class CIELChEvaluator implements TypeEvaluator<Integer> { private final ColorCIELCh mStartColor; private final ColorCIELCh mEndColor; private final int mStartInt; private final int mEndInt; public CIELChEvaluator(int startColor, int endColor) { mStartInt = startColor; mEndInt = endColor; mStartColor = convertRgbToCIELCH(startColor); mEndColor = convertRgbToCIELCH(endColor); } Loading @@ -29,6 +35,9 @@ public class CIELChEvaluator implements TypeEvaluator<Integer> { @Override public Integer evaluate(float fraction, Integer ignored, Integer ignored2) { if (mStartInt == mEndInt) { return mStartInt; } // CIELCH to CIELAB double L = mStartColor.L * (1 - fraction) + mEndColor.L * fraction; Loading
QKSMS/src/main/java/com/moez/QKSMS/ui/ThemeManager.java +4 −2 Original line number Diff line number Diff line Loading @@ -621,9 +621,11 @@ public class ThemeManager { } public static void setActiveColor(int color) { if (mActiveColor != color) { mActiveColor = color; LiveViewManager.refreshViews(QKPreference.THEME); } } private static boolean isColorDarkEnough(int color) { for (int i = 0; i < COLORS.length; i++) { Loading