/frameworks/base/libs/hwui/utils/ |
D | Color.h | 30 namespace Color { 31 enum Color { enum 63 static_assert(Color::White == SK_ColorWHITE, "color format has changed"); 64 static_assert(Color::Black == SK_ColorBLACK, "color format has changed"); 67 static const Color::Color BrightColors[] = { 68 Color::Red_500, Color::Pink_500, Color::Purple_500, Color::DeepPurple_500, 69 Color::Indigo_500, Color::Blue_500, Color::LightBlue_500, Color::Cyan_500, 70 Color::Teal_500, Color::Green_500, Color::LightGreen_500, Color::Lime_500, 71 Color::Yellow_500, Color::Amber_500, Color::Orange_500, Color::DeepOrange_500, 72 Color::Brown_500, Color::Grey_500, Color::BlueGrey_500, [all …]
|
/frameworks/native/services/surfaceflinger/tests/ |
D | Transaction_test.cpp | 55 struct Color { struct 61 static const Color RED; argument 62 static const Color GREEN; argument 63 static const Color BLUE; argument 64 static const Color WHITE; argument 65 static const Color BLACK; argument 66 static const Color TRANSPARENT; argument 69 const Color Color::RED{255, 0, 0, 255}; 70 const Color Color::GREEN{0, 255, 0, 255}; 71 const Color Color::BLUE{0, 0, 255, 255}; [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | ScrimState.java | 19 import android.graphics.Color; 56 mCurrentInFrontTint = Color.BLACK; in prepare() 57 mCurrentBehindTint = Color.BLACK; in prepare() 105 mCurrentInFrontTint = Color.BLACK; in prepare() 106 mCurrentBehindTint = Color.BLACK; in prepare() 131 mCurrentBehindTint = Color.BLACK; in prepare() 155 updateScrimColor(mScrimInFront, 1, Color.BLACK); in prepare() 156 updateScrimColor(mScrimBehind, 1, Color.BLACK); in prepare() 158 mCurrentInFrontTint = Color.BLACK; in prepare() 159 mCurrentBehindTint = Color.BLACK; in prepare() [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/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
D | NotificationUtils.java | 23 import android.graphics.Color; 55 return Color.argb( in interpolateColors() 56 (int) interpolate(Color.alpha(startColor), Color.alpha(endColor), amount), in interpolateColors() 57 (int) interpolate(Color.red(startColor), Color.red(endColor), amount), in interpolateColors() 58 (int) interpolate(Color.green(startColor), Color.green(endColor), amount), in interpolateColors() 59 (int) interpolate(Color.blue(startColor), Color.blue(endColor), amount)); in interpolateColors()
|
D | ImageGradientColorizer.java | 21 import android.graphics.Color; 53 int tri = Color.red(backgroundColor); in colorize() 54 int tgi = Color.green(backgroundColor); in colorize() 55 int tbi = Color.blue(backgroundColor); in colorize() 73 new int[] {0, Color.argb(0.5f, 1, 1, 1), Color.BLACK}, in colorize() 95 new int[] {0, Color.argb(0.5f, 1, 1, 1), Color.BLACK}, in colorize()
|
/frameworks/base/core/java/android/app/ |
D | WallpaperColors.java | 24 import android.graphics.Color; 97 private final ArrayList<Color> mMainColors; 105 Color color = Color.valueOf(colorInt); in WallpaperColors() 183 Color primary = null, secondary = null, tertiary = null; in fromBitmap() 187 Color color = Color.valueOf(swatches.get(i).getRgb()); in fromBitmap() 222 public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor, in WallpaperColors() 223 @Nullable Color tertiaryColor) { in WallpaperColors() 240 public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor, in WallpaperColors() 241 @Nullable Color tertiaryColor, int colorHints) { in WallpaperColors() 282 List<Color> mainColors = getMainColors(); in writeToParcel() [all …]
|
/frameworks/base/tests/Internal/src/android/app/ |
D | WallpaperColorsTest.java | 21 import android.graphics.Color; 37 final Color color = Color.valueOf(Color.WHITE); in supportsDarkTextOverrideTest() 57 canvas.drawColor(Color.WHITE); in colorHintsTest() 67 canvas.drawColor(Color.BLACK); in colorHintsTest() 76 paint.setColor(Color.BLACK); in colorHintsTest() 77 canvas.drawColor(Color.WHITE); in colorHintsTest() 84 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; 74 colorsExpectedNormal.setMainColor(Color.RED); in getColors_usesExtractedColors() 75 colorsExpectedNormal.setSecondaryColor(Color.GRAY); in getColors_usesExtractedColors() 78 colorsExpectedNormal.setMainColor(Color.BLACK); in getColors_usesExtractedColors() 79 colorsExpectedNormal.setSecondaryColor(Color.BLUE); in getColors_usesExtractedColors() 82 colorsExpectedNormal.setMainColor(Color.MAGENTA); in getColors_usesExtractedColors() 83 colorsExpectedNormal.setSecondaryColor(Color.GREEN); in getColors_usesExtractedColors() 111 extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.RED), null, null), in addOnColorsChangedListener_invokesListener() 117 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 | 21 import android.graphics.Color; 33 int alpha = ColorUtils.calculateMinimumBackgroundAlpha(Color.WHITE, Color.BLACK, 4.5f); in calculateMinimumBackgroundAlpha_satisfiestContrast() 36 int worstCase = ColorUtils.blendARGB(Color.WHITE, Color.BLACK, alpha/255f); in calculateMinimumBackgroundAlpha_satisfiestContrast() 38 double contrast = ColorUtils.calculateContrast(Color.WHITE, worstCase); in calculateMinimumBackgroundAlpha_satisfiestContrast()
|
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/ |
D | Utilities.java | 19 import android.graphics.Color; 36 float bgR = Color.red(bg) / 255f; in computeContrastBetweenColors() 37 float bgG = Color.green(bg) / 255f; in computeContrastBetweenColors() 38 float bgB = Color.blue(bg) / 255f; in computeContrastBetweenColors() 44 float fgR = Color.red(fg) / 255f; in computeContrastBetweenColors() 45 float fgG = Color.green(fg) / 255f; in computeContrastBetweenColors() 46 float fgB = Color.blue(fg) / 255f; in computeContrastBetweenColors()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/ |
D | AdaptiveIconTest.java | 32 import android.graphics.Color; 67 new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK)); in createIcon_shouldSetBackgroundAndInset() 76 spy(new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK))); in setBackgroundColor_shouldUpdateColorFilter() 80 icon.setBackgroundColor(Color.BLUE); in setBackgroundColor_shouldUpdateColorFilter() 82 verify(background).setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP); in setBackgroundColor_shouldUpdateColorFilter() 92 new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK)); in setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon() 103 final AdaptiveIcon icon = new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK)); in setBackgroundColor_tileWithoutBackgroundColor_shouldSetDefaultBackgroundColor() 120 new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK)); in onBindTile_externalTileWithBackgroundColorHint_shouldUpdateIcon() 130 new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK)); in getConstantState_returnCorrectState() 131 icon.setBackgroundColor(Color.YELLOW); in getConstantState_returnCorrectState() [all …]
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | RecentsAnimation.cpp | 32 Color::Red_500, Color::Purple_500, Color::Blue_500, Color::Green_500, in createContent() 38 renderer.drawColor(Color::White, SkBlendMode::kSrcOver); in createContent() 64 mThumbnail.eraseColor(TestUtils::interpolateColor(curFrame / 150.0f, Color::Green_500, in doFrame() 65 Color::DeepOrange_500)); in doFrame() 77 canvas.drawColor(Color::Grey_200, SkBlendMode::kSrcOver); in createCard()
|
D | ListViewAnimation.cpp | 49 paint.setColor(bgDark ? Color::White : Color::Grey_700); in createRandomCharIcon() 66 canvas.clear(Color::Transparent); in createBoxBitmap() 70 paint.setColor(filled ? Color::Yellow_500 : Color::Grey_700); in createBoxBitmap() 84 roundRectPaint.setColor(Color::White); in createListItem() 88 textPaint.setColor(rand() % 2 ? Color::Black : Color::Grey_500); in createListItem()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ |
D | MediaNotificationProcessorTest.java | 33 import android.graphics.Color; 132 canvas.drawColor(Color.WHITE); in findBackgroundSwatch_white() 136 assertCloseColors(swatch.getRgb(), Color.WHITE); in findBackgroundSwatch_white() 144 canvas.drawColor(Color.RED); in findBackgroundSwatch_red() 148 assertCloseColors(swatch.getRgb(), Color.RED); in findBackgroundSwatch_red() 152 assertThat((float) Color.red(expected)).isWithin(COLOR_TOLERANCE).of(Color.red(actual)); in assertCloseColors() 153 assertThat((float) Color.green(expected)).isWithin(COLOR_TOLERANCE).of(Color.green(actual)); in assertCloseColors() 154 assertThat((float) Color.blue(expected)).isWithin(COLOR_TOLERANCE).of(Color.blue(actual)); in assertCloseColors()
|
/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 | 26 import android.graphics.Color; 366 this.foregroundColor = mHasForegroundColor ? foregroundColor : Color.WHITE; in CaptionStyle() 367 this.backgroundColor = mHasBackgroundColor ? backgroundColor : Color.BLACK; in CaptionStyle() 369 this.edgeColor = mHasEdgeColor ? edgeColor : Color.BLACK; in CaptionStyle() 499 WHITE_ON_BLACK = new CaptionStyle(Color.WHITE, Color.BLACK, EDGE_TYPE_NONE, 500 Color.BLACK, COLOR_NONE_OPAQUE, null); 501 BLACK_ON_WHITE = new CaptionStyle(Color.BLACK, Color.WHITE, EDGE_TYPE_NONE, 502 Color.BLACK, COLOR_NONE_OPAQUE, null); 503 YELLOW_ON_BLACK = new CaptionStyle(Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE, 504 Color.BLACK, COLOR_NONE_OPAQUE, null); [all …]
|
/frameworks/layoutlib/bridge/src/android/graphics/ |
D | Color_Delegate.java | 31 java.awt.Color.RGBtoHSB(red, greed, blue, hsv); in nativeRGBToHSV() 37 …java.awt.Color rgb = new java.awt.Color(java.awt.Color.HSBtoRGB(hsv[0] / 360, pin(hsv[1]), pin(hsv… in nativeHSVToColor() 38 return Color.argb(alpha, rgb.getRed(), rgb.getGreen(), rgb.getBlue()); in nativeHSVToColor()
|
/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()
|
/frameworks/base/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/utilities/ |
D | Utilities.java | 28 import android.graphics.Color; 169 return Color.rgb( in getColorWithOverlay() 170 (int) (overlayAlpha * Color.red(baseColor) + in getColorWithOverlay() 171 (1f - overlayAlpha) * Color.red(overlayColor)), in getColorWithOverlay() 172 (int) (overlayAlpha * Color.green(baseColor) + in getColorWithOverlay() 173 (1f - overlayAlpha) * Color.green(overlayColor)), in getColorWithOverlay() 174 (int) (overlayAlpha * Color.blue(baseColor) + in getColorWithOverlay() 175 (1f - overlayAlpha) * Color.blue(overlayColor))); in getColorWithOverlay() 313 float bgR = Color.red(bg) / 255f; in computeContrastBetweenColors() 314 float bgG = Color.green(bg) / 255f; in computeContrastBetweenColors() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | ContrastColorUtil.java | 28 import android.graphics.Color; 284 return Color.argb(Color.alpha(color), in processColor() 285 255 - Color.red(color), in processColor() 286 255 - Color.green(color), in processColor() 287 255 - Color.blue(color)); in processColor() 342 int startAlpha = Color.alpha(color); in findAlphaToMeetContrast() 343 int r = Color.red(color); in findAlphaToMeetContrast() 344 int g = Color.green(color); in findAlphaToMeetContrast() 345 int b = Color.blue(color); in findAlphaToMeetContrast() 350 fg = Color.argb(alpha, r, g, b); in findAlphaToMeetContrast() [all …]
|
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/types/ |
D | TonalTest.java | 24 import android.graphics.Color; 59 tonal.extractInto(new WallpaperColors(Color.valueOf(0xff000000), null, null, 0), in extractInto_usesFallbackWhenTooLightOrDark() 64 tonal.extractInto(new WallpaperColors(Color.valueOf(0xffffffff), null, null, in extractInto_usesFallbackWhenTooLightOrDark() 77 WallpaperColors wallColors = new WallpaperColors(Color.valueOf(Color.RED), null, null, in extractInto_fromBitmap() 83 assertThat(normal.getMainColor()).isEqualTo(Color.RED); in extractInto_fromBitmap() 92 WallpaperColors wallColors = new WallpaperColors(Color.valueOf(Color.RED), null, null, in extractInto_supportsDarkText() 98 assertThat(normal.getMainColor()).isEqualTo(Color.RED); in extractInto_supportsDarkText()
|
/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/ |
D | ResourceModifiers.java | 25 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/EasterEgg/src/com/android/egg/paint/ |
D | Palette.kt | 19 import android.graphics.Color 31 return (Color.red(rgb) * 299f + Color.green(rgb) * 587f + Color.blue(rgb) * 114f) / 1000f in lum() 41 colors[0] = Color.HSVToColor(hsv) in randomize() 47 val color = Color.HSVToColor(hsv) in randomize()
|
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/ |
D | GlifLayoutTest.java | 25 import android.graphics.Color; 100 layout.setPrimaryColor(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColor() 103 .isEqualTo(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColor() 109 .isEqualTo(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColor() 112 .isEqualTo(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColor() 121 layout.setPrimaryColor(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColorTablet() 124 .isEqualTo(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColorTablet() 130 .isEqualTo(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColorTablet() 133 .isEqualTo(ColorStateList.valueOf(Color.RED)); in testSetPrimaryColorTablet() 136 assertThat(((GlifPatternDrawable) getTabletBackground(layout)).getColor()).isEqualTo(Color.RED); in testSetPrimaryColorTablet() [all …]
|