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

Commit a1a0f2d8 authored by Xin Li's avatar Xin Li
Browse files

Merge ab/AP4A.241205.013 into aosp-main-future

Bug: 370570306
Merged-In: I1d7baa7027f263a66063f3453e4ebab807652a63
Change-Id: I741de8a4c333ae88db50a24e7a1051b757ae342b
parents 06ae934c 8dfd750d
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) {