Home
last modified time | relevance | path

Searched refs:palette (Results 1 – 25 of 42) sorted by relevance

12

/frameworks/support/palette/api/
Dcurrent.txt1 package androidx.palette.graphics {
4 method public static androidx.palette.graphics.Palette.Builder from(android.graphics.Bitmap);
5 …method public static androidx.palette.graphics.Palette from(java.util.List<androidx.palette.graphi…
6 …method public static deprecated androidx.palette.graphics.Palette generate(android.graphics.Bitmap…
7 …method public static deprecated androidx.palette.graphics.Palette generate(android.graphics.Bitmap…
8 …cs.Bitmap, java.lang.Void, androidx.palette.graphics.Palette> generateAsync(android.graphics.Bitma…
9 …Bitmap, java.lang.Void, androidx.palette.graphics.Palette> generateAsync(android.graphics.Bitmap, …
10 method public int getColorForTarget(androidx.palette.graphics.Target, int);
12 method public androidx.palette.graphics.Palette.Swatch getDarkMutedSwatch();
14 method public androidx.palette.graphics.Palette.Swatch getDarkVibrantSwatch();
[all …]
/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/graphics/
DPaletteDetailActivity.java33 import androidx.palette.graphics.Palette;
67 mGridView = findViewById(R.id.palette); in onCreate()
133 public void onGenerated(Palette palette) { in loadImage()
134 populatePalette(palette); in loadImage()
160 void setSwatches(List<Palette.Swatch> palette) { in setSwatches() argument
161 mSwatches = palette; in setSwatches()
175 private void populatePalette(Palette palette) { in populatePalette() argument
176 mSwatchesPalette.setSwatches(palette.getSwatches()); in populatePalette()
178 setBackgroundColor(findViewById(R.id.text_vibrant), palette.getVibrantSwatch()); in populatePalette()
179 setBackgroundColor(findViewById(R.id.text_muted), palette.getMutedSwatch()); in populatePalette()
[all …]
DPaletteActivity.java41 import androidx.palette.graphics.Palette;
213 public void onGenerated(Palette palette) { in bindView()
216 palette.getVibrantSwatch()); in bindView()
219 palette.getMutedSwatch()); in bindView()
222 palette.getLightVibrantSwatch()); in bindView()
225 palette.getLightMutedSwatch()); in bindView()
228 palette.getDarkVibrantSwatch()); in bindView()
231 palette.getDarkMutedSwatch()); in bindView()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DMediaNotificationProcessor.java129 Palette palette = paletteBuilder.generate(); in processNotification() local
130 backgroundColor = findBackgroundColorAndFilter(palette); in processNotification()
144 palette = paletteBuilder.generate(); in processNotification()
145 int foregroundColor = selectForegroundColor(backgroundColor, palette); in processNotification()
157 private int selectForegroundColor(int backgroundColor, Palette palette) { in selectForegroundColor() argument
159 return selectForegroundColorForSwatches(palette.getDarkVibrantSwatch(), in selectForegroundColor()
160 palette.getVibrantSwatch(), in selectForegroundColor()
161 palette.getDarkMutedSwatch(), in selectForegroundColor()
162 palette.getMutedSwatch(), in selectForegroundColor()
163 palette.getDominantSwatch(), in selectForegroundColor()
[all …]
/frameworks/support/palette/ktx/src/androidTest/java/androidx/palette/graphics/
DPaletteTest.kt17 package androidx.palette.graphics
23 import androidx.palette.graphics.Target.VIBRANT
39 val palette = Palette.from(bitmap).generate() in operatorGet() constant
40 assertSame(palette.getSwatchForTarget(VIBRANT), palette[VIBRANT]) in operatorGet()
/frameworks/base/core/java/com/android/internal/app/
DPlatLogoActivity.java41 private int[] palette; field in PlatLogoActivity.PBackground
86 palette = new int[slots]; in randomizePalette()
89 palette[i] = Color.HSVToColor(color); in randomizePalette()
91 if (lum(palette[i]) < lum(palette[darkest])) darkest = i; in randomizePalette()
95 for (int c : palette) { in randomizePalette()
127 paint.setColor(0xFF000000 | palette[i % palette.length]); in draw()
137 paint.setColor(0xFF000000 | palette[(darkest+1) % palette.length]); in draw()
148 paint.setColor(palette[darkest]); in draw()
/frameworks/support/palette/src/androidTest/java/androidx/palette/graphics/
DBucketTests.java17 package androidx.palette.graphics;
123 final Palette palette = Palette.from(bitmap).generate(); in testBlueBitmapReturnsBlueSwatch() local
125 assertEquals(1, palette.getSwatches().size()); in testBlueBitmapReturnsBlueSwatch()
127 final Palette.Swatch swatch = palette.getSwatches().get(0); in testBlueBitmapReturnsBlueSwatch()
138 final Palette palette = Palette.from(bitmap) in testBlueBitmapWithRegionReturnsBlueSwatch() local
142 assertEquals(1, palette.getSwatches().size()); in testBlueBitmapWithRegionReturnsBlueSwatch()
144 final Palette.Swatch swatch = palette.getSwatches().get(0); in testBlueBitmapWithRegionReturnsBlueSwatch()
167 final Palette palette = Palette.from(bitmap).generate(); in testDominantSwatch() local
170 assertEquals(3, palette.getSwatches().size()); in testDominantSwatch()
173 final Palette.Swatch swatch = palette.getDominantSwatch(); in testDominantSwatch()
DTestUtils.java17 package androidx.palette.graphics;
26 import androidx.palette.test.R;
DMaxColorsTest.java17 package androidx.palette.graphics;
DConsistencyTest.java17 package androidx.palette.graphics;
DSwatchTests.java17 package androidx.palette.graphics;
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/types/
DTonalTest.java104 for (Tonal.TonalPalette palette : config.getTonalPalettes()) { in tonal_rangeTest()
105 assertTrue("minHue should be >= to 0.", palette.minHue >= 0); in tonal_rangeTest()
106 assertTrue("maxHue should be <= to 360.", palette.maxHue <= 360); in tonal_rangeTest()
108 assertTrue("S should be >= to 0.", palette.s[0] >= 0); in tonal_rangeTest()
109 assertTrue("S should be <= to 1.", palette.s[1] <= 1); in tonal_rangeTest()
111 assertTrue("L should be >= to 0.", palette.l[0] >= 0); in tonal_rangeTest()
112 assertTrue("L should be <= to 1.", palette.l[1] <= 1); in tonal_rangeTest()
/frameworks/base/core/java/com/android/internal/colorextraction/types/
DTonal.java160 TonalPalette palette = findTonalPalette(hsl[0], hsl[1]); in runTonalExtraction() local
161 if (palette == null) { in runTonalExtraction()
167 int fitIndex = bestFit(palette, hsl[0], hsl[1], hsl[2]); in runTonalExtraction()
174 float[] h = fit(palette.h, hsl[0], fitIndex, in runTonalExtraction()
176 float[] s = fit(palette.s, hsl[1], fitIndex, 0.0f, 1.0f); in runTonalExtraction()
177 float[] l = fit(palette.l, hsl[2], fitIndex, 0.0f, 1.0f); in runTonalExtraction()
331 private static int bestFit(@NonNull TonalPalette palette, float h, float s, float l) { in bestFit() argument
335 for (int i = 0; i < palette.h.length; i++) { in bestFit()
337 FIT_WEIGHT_H * Math.abs(h - palette.h[i]) in bestFit()
338 + FIT_WEIGHT_S * Math.abs(s - palette.s[i]) in bestFit()
[all …]
/frameworks/native/opengl/libagl/
Dtexture.cpp485 uint8_t const* const palette = (uint8_t*)data; in decodePalette4() local
491 *p++ = palette[index + 0]; in decodePalette4()
492 *p++ = palette[index + 1]; in decodePalette4()
498 *p++ = palette[index + 0]; in decodePalette4()
499 *p++ = palette[index + 1]; in decodePalette4()
502 *p++ = palette[index + 0]; in decodePalette4()
503 *p++ = palette[index + 1]; in decodePalette4()
509 uint8_t const* const palette = (uint8_t*)data; in decodePalette4() local
515 *p++ = palette[index + 0]; in decodePalette4()
516 *p++ = palette[index + 1]; in decodePalette4()
[all …]
/frameworks/support/palette/ktx/
Dbuild.gradle35 api(project(":palette"))
47 description = "Kotlin extensions for 'palette' artifact"
/frameworks/base/core/java/android/app/
DWallpaperColors.java31 import com.android.internal.graphics.palette.Palette;
32 import com.android.internal.graphics.palette.VariationalKMeansQuantizer;
160 final Palette palette = Palette in fromBitmap() local
169 final ArrayList<Palette.Swatch> swatches = new ArrayList<>(palette.getSwatches()); in fromBitmap()
/frameworks/support/palette/ktx/src/main/java/androidx/palette/graphics/
DPalette.kt19 package androidx.palette.graphics
/frameworks/base/core/java/com/android/internal/graphics/palette/
DQuantizer.java17 package com.android.internal.graphics.palette;
/frameworks/support/samples/Support7Demos/
Dbuild.gradle10 implementation(project(":palette"))
/frameworks/support/buildSrc/
Djetify.gradle50 "m2repository/androidx/palette/palette/**",
/frameworks/support/mediarouter/
Dbuild.gradle12 api(project(":palette"))
/frameworks/support/scripts/
Dsupport-deps-license.sh43 rundeps frameworks/support/v7/palette
/frameworks/support/
Dsettings.gradle107 includeProject(":palette", "palette")
108 includeProject(":palette-ktx", "palette/ktx")
/frameworks/support/media-widget/
Dbuild.gradle29 api(project(":palette"))
/frameworks/base/packages/SystemUI/
DAndroid.mk46 android-support-v7-palette \

12