OSDN Git Service

Generate all color swatches.
authorDanny Baumann <dannybaumann@web.de>
Wed, 27 Apr 2016 11:33:20 +0000 (13:33 +0200)
committerDanny Baumann <dannybaumann@web.de>
Wed, 27 Apr 2016 11:33:20 +0000 (13:33 +0200)
While we only use the vibrant colors in the UI, we also use the palette
to determine the dominant color and compare the vibrant colors against
that. If the dominant color is one of the muted swatches, by only generating
the vibrant swatches we needlessly exclude one of the vibrant colors
from being used as visualizer color.

Change-Id: I3ca1059a653ff39b49b6a38a934863ef6ad2d976

src/com/cyanogenmod/eleven/utils/BitmapWithColors.java

index 7c30354..b3a9962 100644 (file)
@@ -176,12 +176,7 @@ public class BitmapWithColors {
             return;
         }
 
-        final Palette p = Palette.from(mBitmap)
-                .clearTargets()
-                .addTarget(Target.VIBRANT)
-                .addTarget(Target.LIGHT_VIBRANT)
-                .addTarget(Target.DARK_VIBRANT)
-                .generate();
+        final Palette p = Palette.from(mBitmap).generate();
         if (p == null) {
             return;
         }