Home
last modified time | relevance | path

Searched refs:Color (Results 1 – 25 of 394) sorted by relevance

12345678910>>...16

/frameworks/base/libs/hwui/utils/
DColor.h26 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/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DNotificationUtils.java19 import android.graphics.Color;
48 return Color.argb( in interpolateColors()
49 (int) interpolate(Color.alpha(startColor), Color.alpha(endColor), amount), in interpolateColors()
50 (int) interpolate(Color.red(startColor), Color.red(endColor), amount), in interpolateColors()
51 (int) interpolate(Color.green(startColor), Color.green(endColor), amount), in interpolateColors()
52 (int) interpolate(Color.blue(startColor), Color.blue(endColor), amount)); in interpolateColors()
DImageGradientColorizer.java22 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/tests/java/android/support/v4/graphics/
DColorUtilsTest.java22 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/core/java/com/android/internal/graphics/
DColorUtils.java23 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/core-utils/java/android/support/v4/graphics/
DColorUtils.java19 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/support/v7/palette/tests/java/android/support/v7/graphics/
DTestUtils.java23 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()
DBucketTests.java28 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 …]
DSwatchTests.java28 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/support/v17/leanback/tests/java/android/support/v17/leanback/app/
DBackgroundManagerTest.java26 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/support/v17/leanback/src/android/support/v17/leanback/graphics/
DColorOverlayDimmer.java19 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()
DColorFilterCache.java16 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/
DGlifLayoutTest.java31 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/
DIconCompatTest.java27 import android.graphics.Color;
54 assertEquals(Color.TRANSPARENT, bitmap.getPixel(0, 0)); in verifyClippedCircle()
55 assertEquals(Color.TRANSPARENT, bitmap.getPixel(0, size - 1)); in verifyClippedCircle()
56 assertEquals(Color.TRANSPARENT, bitmap.getPixel(size - 1, 0)); in verifyClippedCircle()
57 assertEquals(Color.TRANSPARENT, bitmap.getPixel(size - 1, size - 1)); in verifyClippedCircle()
63 source.eraseColor(Color.RED); in testClipAdaptiveIcon()
65 verifyClippedCircle(result, Color.RED, 100); in testClipAdaptiveIcon()
71 bitmap.eraseColor(Color.RED); in testCreateWithBitmap_legacy()
82 bitmap.eraseColor(Color.RED); in testCreateWithBitmap()
92 bitmap.eraseColor(Color.GREEN); in testCreateWithAdaptiveBitmap_legacy()
[all …]
/frameworks/base/libs/hwui/tests/common/scenes/
DRecentsAnimation.cpp33 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()
DListViewAnimation.cpp47 paint.setColor(bgDark ? Color::White : Color::Grey_700); in createRandomCharIcon()
64 canvas.clear(Color::Transparent); in createBoxBitmap()
68 paint.setColor(filled ? Color::Yellow_500 : Color::Grey_700); in createBoxBitmap()
82 roundRectPaint.setColor(Color::White); in createListItem()
87 textPaint.setColor(rand() % 2 ? Color::Black : Color::Grey_500); in createListItem()
/frameworks/support/design/tests/src/android/support/design/testutils/
DTestUtils.java23 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/
DDuotoneFilter.java27 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/com/android/internal/util/
DNotificationColorUtil.java28 import android.graphics.Color;
244 return Color.argb(Color.alpha(color), in processColor()
245 255 - Color.red(color), in processColor()
246 255 - Color.green(color), in processColor()
247 255 - Color.blue(color)); in processColor()
302 int startAlpha = Color.alpha(color); in findAlphaToMeetContrast()
303 int r = Color.red(color); in findAlphaToMeetContrast()
304 int g = Color.green(color); in findAlphaToMeetContrast()
305 int b = Color.blue(color); in findAlphaToMeetContrast()
310 fg = Color.argb(alpha, r, g, b); in findAlphaToMeetContrast()
[all …]
/frameworks/base/core/java/android/view/accessibility/
DCaptioningManager.java25 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/compat/tests/java/android/support/v4/testutils/
DTestUtils.java22 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/
DMinimizedDockShadow.java22 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()
/frameworks/support/core-ui/tests/java/android/support/v4/testutils/
DTestUtils.java22 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/base/tests/CanvasCompare/src/com/android/test/hwuicompare/
DResourceModifiers.java25 import android.graphics.Color;
89 Color.RED, Color.GREEN, Shader.TileMode.CLAMP); in ResourceModifiers()
97 Color.BLUE, Color.RED, Shader.TileMode.CLAMP); in ResourceModifiers()
100 Color.YELLOW, Color.MAGENTA, Shader.TileMode.MIRROR); in ResourceModifiers()
103 Color.YELLOW, Color.MAGENTA); in ResourceModifiers()
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/misc/
DUtilities.java27 import android.graphics.Color;
175 float bgR = Color.red(bg) / 255f; in computeContrastBetweenColors()
176 float bgG = Color.green(bg) / 255f; in computeContrastBetweenColors()
177 float bgB = Color.blue(bg) / 255f; in computeContrastBetweenColors()
183 float fgR = Color.red(fg) / 255f; in computeContrastBetweenColors()
184 float fgG = Color.green(fg) / 255f; in computeContrastBetweenColors()
185 float fgB = Color.blue(fg) / 255f; in computeContrastBetweenColors()
196 return Color.rgb( in getColorWithOverlay()
197 (int) (overlayAlpha * Color.red(baseColor) + in getColorWithOverlay()
198 (1f - overlayAlpha) * Color.red(overlayColor)), in getColorWithOverlay()
[all …]

12345678910>>...16