Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8dfd750d authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/29951740'] into 24Q4-release.

Change-Id: I79fd7468ba8f57b65068ddbd6c557b16c9c91f99
parents 0d1f035b dd7d31f4
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -328,7 +328,13 @@ public class ColorScheme {
    }

    private static double hueDiff(double a, double b) {
        return 180f - (Math.abs(a - b) - 180f);
        double diff = Math.abs(a - b);
        if (diff > 180f) {
            // 0 and 360 are the same hue. If hue difference is greater than 180, subtract from 360
            // to account for the circularity.
            diff = 360f - diff;
        }
        return diff;
    }

    private static String stringForColor(int color) {