Home
last modified time | relevance | path

Searched refs:swatch (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/core/java/com/android/internal/graphics/palette/
DPalette.java326 Palette.Swatch swatch = getSwatchForTarget(target); in getColorForTarget() local
327 return swatch != null ? swatch.getRgb() : defaultColor; in getColorForTarget()
377 final Palette.Swatch swatch = mSwatches.get(i); in getMaxScoredSwatchForTarget() local
378 if (shouldBeScoredForTarget(swatch, target)) { in getMaxScoredSwatchForTarget()
379 final float score = generateScore(swatch, target); in getMaxScoredSwatchForTarget()
381 maxScoreSwatch = swatch; in getMaxScoredSwatchForTarget()
389 private boolean shouldBeScoredForTarget(final Palette.Swatch swatch, final Target target) { in shouldBeScoredForTarget() argument
392 final float hsl[] = swatch.getHsl(); in shouldBeScoredForTarget()
395 && !mUsedColors.get(swatch.getRgb()); in shouldBeScoredForTarget()
398 private float generateScore(Palette.Swatch swatch, Target target) { in generateScore() argument
[all …]
DColorCutQuantizer.java218 Swatch swatch = vbox.getAverageColor(); in generateAverageColors() local
219 if (!shouldIgnoreColor(swatch)) { in generateAverageColors()
222 colors.add(swatch); in generateAverageColors()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DMediaNotificationProcessor.java238 private boolean hasEnoughPopulation(Palette.Swatch swatch) { in hasEnoughPopulation() argument
240 return swatch != null in hasEnoughPopulation()
241 && (swatch.getPopulation() / (float) RESIZE_BITMAP_AREA > MINIMUM_IMAGE_FRACTION); in hasEnoughPopulation()
274 for (Palette.Swatch swatch: swatches) { in findBackgroundSwatch()
275 if (swatch != dominantSwatch in findBackgroundSwatch()
276 && swatch.getPopulation() > highestNonWhitePopulation in findBackgroundSwatch()
277 && !isWhiteOrBlack(swatch.getHsl())) { in findBackgroundSwatch()
278 second = swatch; in findBackgroundSwatch()
279 highestNonWhitePopulation = swatch.getPopulation(); in findBackgroundSwatch()
/frameworks/opt/colorpicker/src/com/android/colorpicker/
DColorPickerPalette.java133 private static void addSwatchToRow(TableRow row, View swatch, int rowNumber) { in addSwatchToRow() argument
135 row.addView(swatch); in addSwatchToRow()
137 row.addView(swatch, 0); in addSwatchToRow()
148 View swatch, String[] contentDescriptions) { in setSwatchDescription() argument
169 swatch.setContentDescription(description); in setSwatchDescription()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/
DMediaNotificationProcessorTest.java134 Palette.Swatch swatch = MediaNotificationProcessor.findBackgroundSwatch(mArtwork); in findBackgroundSwatch_white() local
136 assertCloseColors(swatch.getRgb(), Color.WHITE); in findBackgroundSwatch_white()
146 Palette.Swatch swatch = MediaNotificationProcessor.findBackgroundSwatch(mArtwork); in findBackgroundSwatch_red() local
148 assertCloseColors(swatch.getRgb(), Color.RED); in findBackgroundSwatch_red()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DMediaArtworkProcessor.kt74 val swatch = MediaNotificationProcessor.findBackgroundSwatch(artwork) in processArtwork() constant
82 canvas.drawColor(ColorUtils.setAlphaComponent(swatch.rgb, COLOR_ALPHA)) in processArtwork()