Home
last modified time | relevance | path

Searched refs:swatch (Results 1 – 7 of 7) 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.java245 private static boolean hasEnoughPopulation(Palette.Swatch swatch) { in hasEnoughPopulation() argument
247 return swatch != null in hasEnoughPopulation()
248 && (swatch.getPopulation() / (float) RESIZE_BITMAP_AREA > MINIMUM_IMAGE_FRACTION); in hasEnoughPopulation()
281 for (Palette.Swatch swatch: swatches) { in findBackgroundSwatch()
282 if (swatch != dominantSwatch in findBackgroundSwatch()
283 && swatch.getPopulation() > highestNonWhitePopulation in findBackgroundSwatch()
284 && !isWhiteOrBlack(swatch.getHsl())) { in findBackgroundSwatch()
285 second = swatch; in findBackgroundSwatch()
286 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.kt82 val swatch = MediaNotificationProcessor.findBackgroundSwatch(artwork) in processArtwork() constant
85 canvas.drawColor(ColorUtils.setAlphaComponent(swatch.rgb, COLOR_ALPHA)) in processArtwork()
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/
DMediaDataManager.kt477 val swatch = MediaNotificationProcessor.findBackgroundSwatch(p) in computeBackgroundColor() constant
478 color = swatch.rgb in computeBackgroundColor()