diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 743c25ca75..1a0b46a43b 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -63,6 +63,7 @@ import com.android.launcher3.dot.DotInfo; import com.android.launcher3.dragndrop.DragOptions.PreDragCondition; import com.android.launcher3.dragndrop.DraggableView; import com.android.launcher3.folder.FolderIcon; +import com.android.launcher3.graphics.IconPalette; import com.android.launcher3.graphics.IconShape; import com.android.launcher3.graphics.PreloadIconDrawable; import com.android.launcher3.icons.DotRenderer; @@ -398,7 +399,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, boolean useTheme = shouldUseTheme(); FastBitmapDrawable iconDrawable = info.newIcon(getContext(), useTheme); mDotParams.appColor = iconDrawable.getIconColor(); - mDotParams.color = ColorTokens.DotColor.resolveColor(getContext()); + mDotParams.color = IconPalette.getMutedColor(iconDrawable.getIconColor(), 0.54f); setIcon(iconDrawable); applyLabel(info); } diff --git a/src/com/android/launcher3/graphics/IconPalette.java b/src/com/android/launcher3/graphics/IconPalette.java index bbad36d3e9..9a31bb90e5 100644 --- a/src/com/android/launcher3/graphics/IconPalette.java +++ b/src/com/android/launcher3/graphics/IconPalette.java @@ -16,6 +16,8 @@ package com.android.launcher3.graphics; +import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound; + import android.app.Notification; import android.content.Context; import android.graphics.Color; @@ -155,4 +157,9 @@ public class IconPalette { } return ColorUtils.LABToColor(low, a, b); } + + public static int getMutedColor(int color, float whiteScrimAlpha) { + int whiteScrim = setColorAlphaBound(Color.WHITE, (int) (255 * whiteScrimAlpha)); + return ColorUtils.compositeColors(whiteScrim, color); + } }