Home
last modified time | relevance | path

Searched refs:color (Results 1 – 25 of 113) sorted by relevance

12345

/cts/tests/tests/graphics/src/android/graphics/cts/
DColorTest.java48 { 0xff000000, android.R.color.background_dark }, in resourceColor()
49 { 0xffffffff, android.R.color.background_light }, in resourceColor()
50 { 0xff000000, android.R.color.black }, in resourceColor()
51 { 0xffaaaaaa, android.R.color.darker_gray }, in resourceColor()
52 { 0xff00ddff, android.R.color.holo_blue_bright }, in resourceColor()
53 { 0xff0099cc, android.R.color.holo_blue_dark }, in resourceColor()
54 { 0xff33b5e5, android.R.color.holo_blue_light }, in resourceColor()
55 { 0xff669900, android.R.color.holo_green_dark }, in resourceColor()
56 { 0xff99cc00, android.R.color.holo_green_light }, in resourceColor()
57 { 0xffff8800, android.R.color.holo_orange_dark }, in resourceColor()
[all …]
DColor_ColorLongTest.java260 long color = pack(0.8912f, 0.4962f, 0.1164f, 1.0f, ColorSpace.get(Named.ADOBE_RGB)); in testToArgb() local
263 assertEquals(0xffff7f00, toArgb(color)); in testToArgb()
301 long color = pack(0.5f, 0.0f, 1.0f, 0.25f, p3); in testPack() local
303 assertEquals(0.5f, red(color), 0.01f); in testPack()
304 assertEquals(0.0f, green(color), 0.01f); in testPack()
305 assertEquals(1.0f, blue(color), 0.01f); in testPack()
306 assertEquals(0.25f, alpha(color), 0.01f); in testPack()
308 assertEquals(color, valueOf(0.5f, 0.0f, 1.0f, 0.25f, p3).pack()); in testPack()
381 long color = convert(0xffff8000, ColorSpace.get(Named.ADOBE_RGB)); in testConvertColorInt() local
383 assertEquals(ColorSpace.get(Named.ADOBE_RGB), colorSpace(color)); in testConvertColorInt()
[all …]
DBlurMaskFilterTest.java70 private void verifyQuadrants(int color, Bitmap bitmap, int x, int y, int alphaTolerance) { in verifyQuadrants() argument
74 verifyColor(color, bitmap.getPixel(x, y), alphaTolerance); in verifyQuadrants()
75 verifyColor(color, bitmap.getPixel(right - x, y), alphaTolerance); in verifyQuadrants()
76 verifyColor(color, bitmap.getPixel(x, bottom - y), alphaTolerance); in verifyQuadrants()
77 verifyColor(color, bitmap.getPixel(right - x, bottom - y), alphaTolerance); in verifyQuadrants()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
DRsPackColorTo8888Test.java134 private byte[] rs_PackColorTo8888(Float3 color) { in rs_PackColorTo8888() argument
135 color.x *= 255.f; in rs_PackColorTo8888()
136 color.y *= 255.f; in rs_PackColorTo8888()
137 color.z *= 255.f; in rs_PackColorTo8888()
138 color.x += 0.5f; in rs_PackColorTo8888()
139 color.y += 0.5f; in rs_PackColorTo8888()
140 color.z += 0.5f; in rs_PackColorTo8888()
142 (byte) color.x, (byte) color.y, (byte) color.z, (byte) 255 in rs_PackColorTo8888()
147 private byte[] rs_PackColorTo8888(Float4 color) { in rs_PackColorTo8888() argument
148 color.x *= 255.f; in rs_PackColorTo8888()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DShadowTests.java94 color -> CompareUtils.verifyPixelGrayScale(color, 1)); in testShadowLayout()
104 color -> { in testRedSpotShadow()
105 if (color == Color.WHITE) return true; in testRedSpotShadow()
106 return Color.red(color) > Color.green(color) in testRedSpotShadow()
107 && Color.red(color) > Color.blue(color); in testRedSpotShadow()
120 color -> { in testRedAmbientShadow()
121 if (color == Color.WHITE) return true; in testRedAmbientShadow()
122 return Color.red(color) > Color.green(color) in testRedAmbientShadow()
123 && Color.red(color) > Color.blue(color); in testRedAmbientShadow()
136 color -> { in testRedAmbientBlueSpotShadow()
[all …]
/cts/tests/tests/uirendering27/src/android/uirendering/cts/util/
DCompareUtils.java9 public static boolean verifyPixelWithThreshold(int color, int expectedColor, int threshold) { in verifyPixelWithThreshold() argument
10 int diff = Math.abs(Color.red(color) - Color.red(expectedColor)) in verifyPixelWithThreshold()
11 + Math.abs(Color.green(color) - Color.green(expectedColor)) in verifyPixelWithThreshold()
12 + Math.abs(Color.blue(color) - Color.blue(expectedColor)); in verifyPixelWithThreshold()
21 public static boolean verifyPixelGrayScale(int color, int threshold) { in verifyPixelGrayScale() argument
22 int average = Color.red(color) + Color.green(color) + Color.blue(color); in verifyPixelGrayScale()
24 return Math.abs(Color.red(color) - average) <= threshold in verifyPixelGrayScale()
25 && Math.abs(Color.green(color) - average) <= threshold in verifyPixelGrayScale()
26 && Math.abs(Color.blue(color) - average) <= threshold; in verifyPixelGrayScale()
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DCompareUtils.java9 public static boolean verifyPixelWithThreshold(int color, int expectedColor, int threshold) { in verifyPixelWithThreshold() argument
10 int diff = Math.abs(Color.red(color) - Color.red(expectedColor)) in verifyPixelWithThreshold()
11 + Math.abs(Color.green(color) - Color.green(expectedColor)) in verifyPixelWithThreshold()
12 + Math.abs(Color.blue(color) - Color.blue(expectedColor)); in verifyPixelWithThreshold()
21 public static boolean verifyPixelGrayScale(int color, int threshold) { in verifyPixelGrayScale() argument
22 int average = Color.red(color) + Color.green(color) + Color.blue(color); in verifyPixelGrayScale()
24 return Math.abs(Color.red(color) - average) <= threshold in verifyPixelGrayScale()
25 && Math.abs(Color.green(color) - average) <= threshold in verifyPixelGrayScale()
26 && Math.abs(Color.blue(color) - average) <= threshold; in verifyPixelGrayScale()
/cts/tests/tests/view/surfacevalidator/src/android/view/cts/surfacevalidator/
DPixelColor.java41 public PixelColor(int color) { in PixelColor() argument
42 short alpha = (short) ((color >> 24) & 0xFF); in PixelColor()
43 short blue = (short) ((color >> 16) & 0xFF); in PixelColor()
44 short green = (short) ((color >> 8) & 0xFF); in PixelColor()
45 short red = (short) (color & 0xFF); in PixelColor()
61 private int getMinValue(short color) { in getMinValue() argument
62 if (color - 4 > 0) { in getMinValue()
63 return color - 4; in getMinValue()
68 private int getMaxValue(short color) { in getMaxValue() argument
69 if (color + 4 < 0xFF) { in getMaxValue()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DColorVerifier.java27 public ColorVerifier(@ColorInt int color) { in ColorVerifier() argument
28 this(color, DEFAULT_THRESHOLD); in ColorVerifier()
31 public ColorVerifier(@ColorInt int color, int colorTolerance) { in ColorVerifier() argument
33 mColor = color; in ColorVerifier()
36 public ColorVerifier(@ColorInt int color, int colorThreshold, float spatialTolerance) { in ColorVerifier() argument
38 mColor = color; in ColorVerifier()
DSamplePointVerifier.java74 protected boolean verifyPixel(int color, int expectedColor) { in verifyPixel() argument
75 return CompareUtils.verifyPixelWithThreshold(color, expectedColor, mTolerance); in verifyPixel()
79 boolean verifyPixel(int color); in verifyPixel() argument
86 protected boolean verifyPixel(int color, int expectedColor) { in create()
87 return super.verifyPixel(color, expectedColor) && verifier.verifyPixel(color); in create()
DColorCountVerifier.java26 public ColorCountVerifier(int color, int count, int threshold) { in ColorCountVerifier() argument
27 mColor = color; in ColorCountVerifier()
32 public ColorCountVerifier(int color, int count) { in ColorCountVerifier() argument
33 this(color, count, 0); in ColorCountVerifier()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/bitmapverifiers/
DColorVerifier.java27 public ColorVerifier(@ColorInt int color) { in ColorVerifier() argument
28 this(color, DEFAULT_THRESHOLD); in ColorVerifier()
31 public ColorVerifier(@ColorInt int color, int colorTolerance) { in ColorVerifier() argument
33 mColor = color; in ColorVerifier()
36 public ColorVerifier(@ColorInt int color, int colorThreshold, float spatialTolerance) { in ColorVerifier() argument
38 mColor = color; in ColorVerifier()
DSamplePointVerifier.java74 protected boolean verifyPixel(int color, int expectedColor) { in verifyPixel() argument
75 return CompareUtils.verifyPixelWithThreshold(color, expectedColor, mTolerance); in verifyPixel()
79 boolean verifyPixel(int color); in verifyPixel() argument
86 protected boolean verifyPixel(int color, int expectedColor) { in create()
87 return super.verifyPixel(color, expectedColor) && verifier.verifyPixel(color); in create()
/cts/apps/CtsVerifier/assets/report/
Dcompatibility_result.css17 color: #333;
34 background-color: #d4e9a9;
42 background-color: #a5c639;
55 background-color: #d4e9a9;
62 background-color: #a5c639;
74 background-color: #d4e9a9;
76 border-color: #a5c639;
86 background-color: #a5c639;
100 background-color: #fff;
107 background-color: #fa5858;
[all …]
/cts/hostsidetests/theme/src/android/theme/cts/
DComparisonTask.java73 private static int getAlphaScaledBlue(final int color) { in getAlphaScaledBlue() argument
74 return (color & 0x000000FF) * getAlpha(color) / 255; in getAlphaScaledBlue()
77 private static int getAlphaScaledGreen(final int color) { in getAlphaScaledGreen() argument
78 return ((color & 0x0000FF00) >> 8) * getAlpha(color) / 255; in getAlphaScaledGreen()
81 private static int getAlphaScaledRed(final int color) { in getAlphaScaledRed() argument
82 return ((color & 0x00FF0000) >> 16) * getAlpha(color) / 255; in getAlphaScaledRed()
85 private static int getAlpha(final int color) { in getAlpha() argument
87 return (color & 0xFF000000) >>> 24; in getAlpha()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DNavigationBarColorTest.java287 expectNavigationBarColorSupported(color -> in testSetNavigationBarColor()
288 getNavigationBarBitmap(imeSettingForSolidNavigationBar(color, false), in testSetNavigationBarColor()
293 expectNavigationBarColorSupported(color -> in testSetNavigationBarColor()
295 color, false, info.getBottomNavigationBerHeight(), in testSetNavigationBarColor()
300 expectNavigationBarColorNotSupported(color -> in testSetNavigationBarColor()
301 getNavigationBarBitmap(imeSettingForFloatingIme(color, false), in testSetNavigationBarColor()
314 expectLightNavigationBarSupported((color, lightMode) -> in testLightNavigationBar()
315 getNavigationBarBitmap(imeSettingForSolidNavigationBar(color, lightMode), in testLightNavigationBar()
322 expectLightNavigationBarSupported((color, lightMode) -> in testLightNavigationBar()
324 color, lightMode, info.getBottomNavigationBerHeight(), in testLightNavigationBar() local
[all …]
/cts/tests/tests/media/src/android/media/cts/
DRemoteVirtualDisplayService.java67 int color = data.readInt(); in onCreate()
68 render(color); in onCreate()
103 private void render(int color) { in render() argument
105 Log.i(TAG, "render " + Integer.toHexString(color)); in render()
107 mPresentation.doRendering(color); in render()
160 public void doRendering(final int color) { in doRendering() argument
164 mPresentation.doRendering(color); in doRendering()
190 public void doRendering(int color) { in doRendering() argument
191 mImageView.setImageDrawable(new ColorDrawable(color)); in doRendering()
/cts/tests/tests/widget/src/android/widget/cts/util/
DTestUtils.java129 @ColorInt int color, int allowedComponentVariance, boolean throwExceptionIfFails) { in assertAllPixelsOfColor() argument
132 color, allowedComponentVariance, throwExceptionIfFails); in assertAllPixelsOfColor()
145 @NonNull Rect region, @ColorInt int color, int allowedComponentVariance, in assertRegionPixelsOfColor() argument
159 color, allowedComponentVariance, throwExceptionIfFails); in assertRegionPixelsOfColor()
175 int drawableWidth, int drawableHeight, boolean callSetBounds, @ColorInt int color, in assertAllPixelsOfColor() argument
195 new Rect(0, 0, drawableWidth, drawableHeight), color, in assertAllPixelsOfColor()
212 @NonNull Rect region, @ColorInt int color, int allowedComponentVariance, in assertAllPixelsOfColor() argument
227 if (!areColorsTheSameWithTolerance(color, colorAtCurrPixel, in assertAllPixelsOfColor()
232 + ", b=" + endRow + "] to be " + formatColorToHex(color) in assertAllPixelsOfColor()
255 @ColorInt int color, in assertCenterPixelOfColor() argument
[all …]
/cts/tests/tests/print/src/android/print/cts/
DPageRangeAdjustAndVerify.java233 int color; in adjustPageRangeAndVerifyPages()
236 color = 0xffff0000; in adjustPageRangeAndVerifyPages()
239 color = 0xff00ff00; in adjustPageRangeAndVerifyPages()
242 color = 0xff0000ff; in adjustPageRangeAndVerifyPages()
245 color = 0xffffffff; in adjustPageRangeAndVerifyPages()
249 assertEquals(mSelectedPages[i] + "@" + i, color, in adjustPageRangeAndVerifyPages()
317 int color = 0xffffffff; in adjustPageRangeAndVerifyPages()
319 color = 0xffff0000; in adjustPageRangeAndVerifyPages()
321 color = 0xff00ff00; in adjustPageRangeAndVerifyPages()
323 color = 0xff0000ff; in adjustPageRangeAndVerifyPages()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DTextureViewTest.java105 int color = waitForChange(window, center, Color.WHITE); in testFirstFrames() local
106 assertEquals(Color.GREEN, color); in testFirstFrames()
110 color = waitForChange(window, center, color); in testFirstFrames()
111 assertEquals(Color.BLUE, color); in testFirstFrames()
444 int color = dstBitmap.getPixel(0, 0); in verify() local
445 assertEquals(1.0f, Color.alpha(color) / 255.0f, 0.0f); in verify()
446 assertEquals(srcColor[0], Color.red(color) / 255.0f, 0.01f); in verify()
447 assertEquals(srcColor[1], Color.green(color) / 255.0f, 0.01f); in verify()
448 assertEquals(srcColor[2], Color.blue(color) / 255.0f, 0.01f); in verify()
524 private static void clearColor(int color) { in clearColor() argument
[all …]
DPixelCopyGLProducerCtsActivity.java87 private void clearColor(int color) { in clearColor() argument
88 glClearColor(Color.red(color) / 255.0f, in clearColor()
89 Color.green(color) / 255.0f, in clearColor()
90 Color.blue(color) / 255.0f, in clearColor()
91 Color.alpha(color) / 255.0f); in clearColor()
/cts/tests/tests/display/src/android/display/cts/
DVirtualDisplayTest.java230 final int color, final int windowType, final int windowFlags) { in assertDisplayCanShowPresentation() argument
233 mImageListener.getColor() != color); in assertDisplayCanShowPresentation()
242 color, windowType, windowFlags); in assertDisplayCanShowPresentation()
249 mImageListener.waitForColor(color, TIMEOUT)); in assertDisplayCanShowPresentation()
296 int color, int windowType, int windowFlags) { in TestPresentation() argument
298 mColor = color; in TestPresentation()
333 public boolean waitForColor(int color, long timeoutMillis) { in waitForColor() argument
336 while (mColor != color) { in waitForColor()
364 int color = scanImage(image); in onImageAvailable() local
366 if (mColor != color) { in onImageAvailable()
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DGradientDrawableTest.java71 int[] color = new int[] {1, 2, 3}; in testConstructor() local
74 new GradientDrawable(GradientDrawable.Orientation.BL_TR, color); in testConstructor()
179 private void helpTestSetStroke(int width, int color) { in helpTestSetStroke() argument
181 gradientDrawable.setStroke(width, color); in helpTestSetStroke()
192 private void verifySetStroke_WidthGap(int width, int color, in verifySetStroke_WidthGap() argument
195 gradientDrawable.setStroke(width, color, dashWidth, dashGap); in verifySetStroke_WidthGap()
337 int color; in testSetColor() local
339 color = Color.RED; in testSetColor()
340 gradientDrawable.setColor(color); in testSetColor()
341 assertEquals("Color was set to " + color, color, in testSetColor()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DOrganizationInfoTest.java45 for (int color : colors) { in testSetOrganizationColor()
46 mDevicePolicyManager.setOrganizationColor(ADMIN_RECEIVER_COMPONENT, color); in testSetOrganizationColor()
47 assertEquals(color | 0xFF000000 /* opacity always enforced to 100% */, in testSetOrganizationColor()
64 int color = mDevicePolicyManager.getOrganizationColor(null); in testSetOrGetOrganizationColorWithNullAdminFails() local
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DNavigationBarInfo.java125 color -> getBottomNavigationBarBitmapForActivity( in getInstance()
126 color, false /* lightNavigationBar */, actualBottomInset, in getInstance()
131 (color, lightNavigationBar) -> getBottomNavigationBarBitmapForActivity( in getInstance()
132 color, lightNavigationBar, actualBottomInset, in getInstance()
137 (color, lightNavigationBar) -> getBottomNavigationBarBitmapForActivity( in getInstance()
138 color, lightNavigationBar, actualBottomInset, in getInstance()

12345