/frameworks/base/libs/hwui/utils/ |
D | Color.h | 26 namespace Color { 27 enum Color { enum 59 static_assert(Color::White == SK_ColorWHITE, "color format has changed"); 60 static_assert(Color::Black == SK_ColorBLACK, "color format has changed"); 63 static const Color::Color BrightColors[] = { 64 Color::Red_500, 65 Color::Pink_500, 66 Color::Purple_500, 67 Color::DeepPurple_500, 68 Color::Indigo_500, [all …]
|
/frameworks/support/core-utils/tests/java/android/support/v4/graphics/ |
D | ColorUtilsTest.java | 22 import android.graphics.Color; 48 sEntryList.add(new TestEntry(Color.BLACK).setHsl(0f, 0f, 0f) in sEntryList.add() 52 sEntryList.add(new TestEntry(Color.WHITE).setHsl(0f, 0f, 1f) in sEntryList.add() 56 sEntryList.add(new TestEntry(Color.BLUE).setHsl(240f, 1f, 0.5f) in sEntryList.add() 60 sEntryList.add(new TestEntry(Color.GREEN).setHsl(120f, 1f, 0.5f) in sEntryList.add() 64 sEntryList.add(new TestEntry(Color.RED).setHsl(0f, 1f, 0.5f) in sEntryList.add() 68 sEntryList.add(new TestEntry(Color.CYAN).setHsl(180f, 1f, 0.5f) in sEntryList.add() 151 ColorUtils.calculateMinimumAlpha(Color.BLACK, entry.rgb, 3.0f)); in testMinAlphas() 153 ColorUtils.calculateMinimumAlpha(Color.BLACK, entry.rgb, 4.5f)); in testMinAlphas() 155 ColorUtils.calculateMinimumAlpha(Color.WHITE, entry.rgb, 3.0f)); in testMinAlphas() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
D | NotificationUtils.java | 20 import android.graphics.Color; 51 return Color.argb( in interpolateColors() 52 (int) interpolate(Color.alpha(startColor), Color.alpha(endColor), amount), in interpolateColors() 53 (int) interpolate(Color.red(startColor), Color.red(endColor), amount), in interpolateColors() 54 (int) interpolate(Color.green(startColor), Color.green(endColor), amount), in interpolateColors() 55 (int) interpolate(Color.blue(startColor), Color.blue(endColor), amount)); in interpolateColors()
|
D | ImageGradientColorizer.java | 22 import android.graphics.Color; 55 int tri = Color.red(backgroundColor); in colorize() 56 int tgi = Color.green(backgroundColor); in colorize() 57 int tbi = Color.blue(backgroundColor); in colorize() 75 new int[] {0, Color.argb(0.5f, 1, 1, 1), Color.BLACK}, in colorize() 97 new int[] {0, Color.argb(0.5f, 1, 1, 1), Color.BLACK}, in colorize()
|
/frameworks/support/core-utils/java/android/support/v4/graphics/ |
D | ColorUtils.java | 19 import android.graphics.Color; 48 int bgAlpha = Color.alpha(background); in compositeColors() 49 int fgAlpha = Color.alpha(foreground); in compositeColors() 52 int r = compositeComponent(Color.red(foreground), fgAlpha, in compositeColors() 53 Color.red(background), bgAlpha, a); in compositeColors() 54 int g = compositeComponent(Color.green(foreground), fgAlpha, in compositeColors() 55 Color.green(background), bgAlpha, a); in compositeColors() 56 int b = compositeComponent(Color.blue(foreground), fgAlpha, in compositeColors() 57 Color.blue(background), bgAlpha, a); in compositeColors() 59 return Color.argb(a, r, g, b); in compositeColors() [all …]
|
/frameworks/base/core/java/com/android/internal/graphics/ |
D | ColorUtils.java | 23 import android.graphics.Color; 49 int bgAlpha = Color.alpha(background); in compositeColors() 50 int fgAlpha = Color.alpha(foreground); in compositeColors() 53 int r = compositeComponent(Color.red(foreground), fgAlpha, in compositeColors() 54 Color.red(background), bgAlpha, a); in compositeColors() 55 int g = compositeComponent(Color.green(foreground), fgAlpha, in compositeColors() 56 Color.green(background), bgAlpha, a); in compositeColors() 57 int b = compositeComponent(Color.blue(foreground), fgAlpha, in compositeColors() 58 Color.blue(background), bgAlpha, a); in compositeColors() 60 return Color.argb(a, r, g, b); in compositeColors() [all …]
|
/frameworks/support/v7/palette/tests/java/android/support/v7/graphics/ |
D | TestUtils.java | 23 import android.graphics.Color; 36 assertEquals(Color.red(expected), Color.red(actual), 8); in assertCloseColors() 37 assertEquals(Color.green(expected), Color.green(actual), 8); in assertCloseColors() 38 assertEquals(Color.blue(expected), Color.blue(actual), 8); in assertCloseColors()
|
D | BucketTests.java | 28 import android.graphics.Color; 61 swatches.add(new Palette.Swatch(Color.BLACK, 40)); in testSwatchesBuilder() 62 swatches.add(new Palette.Swatch(Color.GREEN, 60)); in testSwatchesBuilder() 63 swatches.add(new Palette.Swatch(Color.BLUE, 10)); in testSwatchesBuilder() 124 canvas.drawColor(Color.BLUE); in testBlueBitmapReturnsBlueSwatch() 131 assertCloseColors(Color.BLUE, swatch.getRgb()); in testBlueBitmapReturnsBlueSwatch() 139 canvas.drawColor(Color.BLUE); in testBlueBitmapWithRegionReturnsBlueSwatch() 148 assertCloseColors(Color.BLUE, swatch.getRgb()); in testBlueBitmapWithRegionReturnsBlueSwatch() 158 canvas.drawColor(Color.BLUE); in testDominantSwatch() 162 paint.setColor(Color.GREEN); in testDominantSwatch() [all …]
|
D | SwatchTests.java | 28 import android.graphics.Color; 82 Palette.Swatch swatch1 = new Palette.Swatch(Color.WHITE, 50); in testEqualsWhenSame() 83 Palette.Swatch swatch2 = new Palette.Swatch(Color.WHITE, 50); in testEqualsWhenSame() 90 Palette.Swatch swatch1 = new Palette.Swatch(Color.BLACK, 50); in testEqualsWhenColorDifferent() 91 Palette.Swatch swatch2 = new Palette.Swatch(Color.WHITE, 50); in testEqualsWhenColorDifferent() 98 Palette.Swatch swatch1 = new Palette.Swatch(Color.BLACK, 50); in testEqualsWhenPopulationDifferent() 99 Palette.Swatch swatch2 = new Palette.Swatch(Color.BLACK, 100); in testEqualsWhenPopulationDifferent() 106 Palette.Swatch swatch1 = new Palette.Swatch(Color.BLUE, 50); in testEqualsWhenDifferent() 107 Palette.Swatch swatch2 = new Palette.Swatch(Color.BLACK, 100); in testEqualsWhenDifferent()
|
/frameworks/base/core/java/android/app/ |
D | WallpaperColors.java | 23 import android.graphics.Color; 88 private final ArrayList<Color> mMainColors; 96 Color color = Color.valueOf(colorInt); in WallpaperColors() 168 Color primary = null, secondary = null, tertiary = null; in fromBitmap() 172 Color color = Color.valueOf(swatches.get(i).getRgb()); in fromBitmap() 207 public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor, in WallpaperColors() 208 @Nullable Color tertiaryColor) { in WallpaperColors() 224 public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor, in WallpaperColors() 225 @Nullable Color tertiaryColor, int colorHints) { in WallpaperColors() 266 List<Color> mainColors = getMainColors(); in writeToParcel() [all …]
|
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/app/ |
D | BackgroundManagerTest.java | 26 import android.graphics.Color; 226 setBitmapAndVerify(manager, createBitmap(200, 100, Color.GREEN)); in testSwitchBackgrounds() 229 setDrawableAndVerify(manager, createDrawable(200, 100, Color.MAGENTA)); in testSwitchBackgrounds() 231 setBitmapAndVerify(manager, createBitmap(200, 100, Color.GRAY)); in testSwitchBackgrounds() 234 setColorAndVerify(manager, Color.RED); in testSwitchBackgrounds() 237 setBitmapAndVerify(manager, createBitmap(200, 100, Color.BLACK)); in testSwitchBackgrounds() 240 setBitmapNullAndVerifyColor(manager, Color.RED); in testSwitchBackgrounds() 243 setBitmapAndVerify(manager, createBitmap(200, 100, Color.MAGENTA)); in testSwitchBackgrounds() 256 BackgroundManager.getInstance(activity).setColor(Color.BLUE); in establishInOnAttachToWindow() 264 assertIsColorDrawable(manager, Color.BLUE); in establishInOnAttachToWindow() [all …]
|
/frameworks/base/tests/Internal/src/android/app/ |
D | WallpaperColorsTest.java | 21 import android.graphics.Color; 36 final Color color = Color.valueOf(Color.WHITE); in supportsDarkTextOverrideTest() 56 canvas.drawColor(Color.WHITE); in colorHintsTest() 66 canvas.drawColor(Color.BLACK); in colorHintsTest() 75 paint.setColor(Color.BLACK); in colorHintsTest() 76 canvas.drawColor(Color.WHITE); in colorHintsTest() 83 WallpaperColors colors = new WallpaperColors(Color.valueOf(Color.GREEN), null, null); in colorHintsTest()
|
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/ |
D | ColorExtractorTest.java | 29 import android.graphics.Color; 68 colorsExpectedNormal.setMainColor(Color.RED); in getColors_usesExtractedColors() 69 colorsExpectedNormal.setSecondaryColor(Color.GRAY); in getColors_usesExtractedColors() 72 colorsExpectedNormal.setMainColor(Color.BLACK); in getColors_usesExtractedColors() 73 colorsExpectedNormal.setSecondaryColor(Color.BLUE); in getColors_usesExtractedColors() 76 colorsExpectedNormal.setMainColor(Color.MAGENTA); in getColors_usesExtractedColors() 77 colorsExpectedNormal.setSecondaryColor(Color.GREEN); in getColors_usesExtractedColors() 104 extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.RED), null, null), in addOnColorsChangedListener_invokesListener() 110 extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.RED), null, null), in addOnColorsChangedListener_invokesListener()
|
/frameworks/base/tests/Internal/src/com/android/internal/graphics/ |
D | ColorUtilsTest.java | 19 import android.graphics.Color; 32 int alpha = ColorUtils.calculateMinimumBackgroundAlpha(Color.WHITE, Color.BLACK, 4.5f); in calculateMinimumBackgroundAlpha_satisfiestContrast() 35 int worstCase = ColorUtils.blendARGB(Color.WHITE, Color.BLACK, alpha/255f); in calculateMinimumBackgroundAlpha_satisfiestContrast() 37 double contrast = ColorUtils.calculateContrast(Color.WHITE, worstCase); in calculateMinimumBackgroundAlpha_satisfiestContrast()
|
/frameworks/support/v17/leanback/src/android/support/v17/leanback/graphics/ |
D | ColorOverlayDimmer.java | 19 import android.graphics.Color; 75 dimColor = Color.rgb(Color.red(dimColor), Color.green(dimColor), Color.blue(dimColor)); in ColorOverlayDimmer() 133 return Color.argb(Color.alpha(color), in applyToColor() 134 (int)(Color.red(color) * f), in applyToColor() 135 (int)(Color.green(color) * f), in applyToColor() 136 (int)(Color.blue(color) * f)); in applyToColor()
|
D | ColorFilterCache.java | 16 import android.graphics.Color; 41 final int r = Color.red(color); in getColorFilterCache() 42 final int g = Color.green(color); in getColorFilterCache() 43 final int b = Color.blue(color); in getColorFilterCache() 44 color = Color.rgb(r, g, b); in getColorFilterCache() 56 int color = Color.argb(i, r, g, b); in ColorFilterCache()
|
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/ |
D | GlifLayoutTest.java | 31 import android.graphics.Color; 103 layout.setPrimaryColor(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColor() 105 ColorStateList.valueOf(Color.RED), layout.getPrimaryColor()); in testSetPrimaryColor() 110 ColorStateList.valueOf(Color.RED), progressBar.getIndeterminateTintList()); in testSetPrimaryColor() 112 ColorStateList.valueOf(Color.RED), progressBar.getProgressBackgroundTintList()); in testSetPrimaryColor() 121 layout.setPrimaryColor(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColorTablet() 123 ColorStateList.valueOf(Color.RED), layout.getPrimaryColor()); in testSetPrimaryColorTablet() 128 ColorStateList.valueOf(Color.RED), progressBar.getIndeterminateTintList()); in testSetPrimaryColorTablet() 130 ColorStateList.valueOf(Color.RED), progressBar.getProgressBackgroundTintList()); in testSetPrimaryColorTablet() 133 assertEquals(Color.RED, ((GlifPatternDrawable) getTabletBackground(layout)).getColor()); in testSetPrimaryColorTablet() [all …]
|
/frameworks/support/compat/tests/java/android/support/v4/graphics/drawable/ |
D | IconCompatTest.java | 27 import android.graphics.Color; 53 assertEquals(Color.TRANSPARENT, bitmap.getPixel(0, 0)); in verifyClippedCircle() 54 assertEquals(Color.TRANSPARENT, bitmap.getPixel(0, size - 1)); in verifyClippedCircle() 55 assertEquals(Color.TRANSPARENT, bitmap.getPixel(size - 1, 0)); in verifyClippedCircle() 56 assertEquals(Color.TRANSPARENT, bitmap.getPixel(size - 1, size - 1)); in verifyClippedCircle() 62 source.eraseColor(Color.RED); in testClipAdaptiveIcon() 64 verifyClippedCircle(result, Color.RED, 100); in testClipAdaptiveIcon() 70 bitmap.eraseColor(Color.RED); in testCreateWithBitmap_legacy() 81 bitmap.eraseColor(Color.RED); in testCreateWithBitmap() 91 bitmap.eraseColor(Color.GREEN); in testCreateWithAdaptiveBitmap_legacy() [all …]
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | RecentsAnimation.cpp | 33 Color::Red_500, in createContent() 34 Color::Purple_500, in createContent() 35 Color::Blue_500, in createContent() 36 Color::Green_500, in createContent() 42 renderer.drawColor(Color::White, SkBlendMode::kSrcOver); in createContent() 69 curFrame / 150.0f, Color::Green_500, Color::DeepOrange_500)); in doFrame() 80 canvas.drawColor(Color::Grey_200, SkBlendMode::kSrcOver); in createCard()
|
/frameworks/support/design/tests/src/android/support/design/testutils/ |
D | TestUtils.java | 23 import android.graphics.Color; 71 final int expectedAlpha = Color.alpha(color); in assertAllPixelsOfColor() 72 final int expectedRed = Color.red(color); in assertAllPixelsOfColor() 73 final int expectedGreen = Color.green(color); in assertAllPixelsOfColor() 74 final int expectedBlue = Color.blue(color); in assertAllPixelsOfColor() 80 int sourceAlpha = Color.alpha(rowPixels[column]); in assertAllPixelsOfColor() 81 int sourceRed = Color.red(rowPixels[column]); in assertAllPixelsOfColor() 82 int sourceGreen = Color.green(rowPixels[column]); in assertAllPixelsOfColor() 83 int sourceBlue = Color.blue(rowPixels[column]); in assertAllPixelsOfColor()
|
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/ |
D | DuotoneFilter.java | 27 import android.graphics.Color; 112 float first[] = { Color.red(mFirstColor)/255f, in updateParameters() 113 Color.green(mFirstColor)/255f, in updateParameters() 114 Color.blue(mFirstColor)/255f }; in updateParameters() 115 float second[] = { Color.red(mSecondColor)/255f, in updateParameters() 116 Color.green(mSecondColor)/255f, in updateParameters() 117 Color.blue(mSecondColor)/255f }; in updateParameters()
|
/frameworks/base/core/java/android/view/accessibility/ |
D | CaptioningManager.java | 25 import android.graphics.Color; 364 this.foregroundColor = mHasForegroundColor ? foregroundColor : Color.WHITE; in CaptionStyle() 365 this.backgroundColor = mHasBackgroundColor ? backgroundColor : Color.BLACK; in CaptionStyle() 367 this.edgeColor = mHasEdgeColor ? edgeColor : Color.BLACK; in CaptionStyle() 497 WHITE_ON_BLACK = new CaptionStyle(Color.WHITE, Color.BLACK, EDGE_TYPE_NONE, 498 Color.BLACK, COLOR_NONE_OPAQUE, null); 499 BLACK_ON_WHITE = new CaptionStyle(Color.BLACK, Color.WHITE, EDGE_TYPE_NONE, 500 Color.BLACK, COLOR_NONE_OPAQUE, null); 501 YELLOW_ON_BLACK = new CaptionStyle(Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE, 502 Color.BLACK, COLOR_NONE_OPAQUE, null); [all …]
|
/frameworks/support/core-ui/tests/java/android/support/v4/testutils/ |
D | TestUtils.java | 22 import android.graphics.Color; 77 + Color.red(color) + "," + Color.green(color) + "," in assertAllPixelsOfColor() 78 + Color.blue(color) in assertAllPixelsOfColor() 80 + Color.red(rowPixels[column]) + "," in assertAllPixelsOfColor() 81 + Color.green(rowPixels[column]) + "," in assertAllPixelsOfColor() 82 + Color.blue(rowPixels[column]) + "]"; in assertAllPixelsOfColor()
|
/frameworks/support/compat/tests/java/android/support/v4/testutils/ |
D | TestUtils.java | 22 import android.graphics.Color; 78 + Color.red(color) + "," + Color.green(color) + "," in assertAllPixelsOfColor() 79 + Color.blue(color) in assertAllPixelsOfColor() 81 + Color.red(rowPixels[column]) + "," in assertAllPixelsOfColor() 82 + Color.green(rowPixels[column]) + "," in assertAllPixelsOfColor() 83 + Color.blue(rowPixels[column]) + "]"; in assertAllPixelsOfColor()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/stackdivider/ |
D | MinimizedDockShadow.java | 22 import android.graphics.Color; 58 final int middleColor = Color.argb( in updatePaint() 59 (Color.alpha(startColor) + Color.alpha(endColor)) / 2, 0, 0, 0); in updatePaint() 60 final int quarter = Color.argb( in updatePaint() 61 (int) (Color.alpha(startColor) * 0.25f + Color.alpha(endColor) * 0.75f), in updatePaint()
|