Home
last modified time | relevance | path

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

12345678910>>...16

/frameworks/base/libs/hwui/utils/
DColor.h30 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/
DTransaction_test.cpp56 struct Color { struct
62 static const Color RED; argument
63 static const Color GREEN; argument
64 static const Color BLUE; argument
65 static const Color WHITE; argument
66 static const Color BLACK; argument
67 static const Color TRANSPARENT; argument
70 const Color Color::RED{255, 0, 0, 255};
71 const Color Color::GREEN{0, 255, 0, 255};
72 const Color Color::BLUE{0, 0, 255, 255};
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DScrimState.java19 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()
132 mCurrentInFrontTint = Color.BLACK; in prepare()
140 updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); in prepare()
167 updateScrimColor(mScrimInFront, 1, Color.BLACK); in prepare()
168 updateScrimColor(mScrimBehind, 1, Color.BLACK); in prepare()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/
DClockPalette.kt19 import android.graphics.Color
32 private var accentPrimary: Int = Color.WHITE
33 private var accentSecondaryLight: Int = Color.WHITE
34 private var accentSecondaryDark: Int = Color.BLACK
46 Color.colorToHSV(accentSecondaryLight, lightHSV) in getSecondaryColor()
47 Color.colorToHSV(accentSecondaryDark, darkHSV) in getSecondaryColor()
51 return Color.HSVToColor(hsv) in getSecondaryColor()
57 accentPrimary = Color.WHITE in setColorPalette()
58 accentSecondaryLight = Color.WHITE in setColorPalette()
59 accentSecondaryDark = if (supportsDarkText) Color.BLACK else Color.WHITE in setColorPalette()
/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/base/core/java/android/app/
DWallpaperColors.java24 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/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DNotificationUtils.java23 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()
DImageGradientColorizer.java21 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/tests/Internal/src/android/app/
DWallpaperColorsTest.java21 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/
DColorExtractorTest.java29 import android.graphics.Color;
71 colorsExpectedNormal.setMainColor(Color.RED); in getColors_usesExtractedColors()
72 colorsExpectedNormal.setSecondaryColor(Color.GRAY); in getColors_usesExtractedColors()
75 colorsExpectedNormal.setMainColor(Color.BLACK); in getColors_usesExtractedColors()
76 colorsExpectedNormal.setSecondaryColor(Color.BLUE); in getColors_usesExtractedColors()
79 colorsExpectedNormal.setMainColor(Color.MAGENTA); in getColors_usesExtractedColors()
80 colorsExpectedNormal.setSecondaryColor(Color.GREEN); in getColors_usesExtractedColors()
108 extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.RED), null, null), in addOnColorsChangedListener_invokesListener()
114 extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.RED), null, null), in addOnColorsChangedListener_invokesListener()
/frameworks/base/tests/Internal/src/com/android/internal/graphics/
DColorUtilsTest.java21 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/
DUtilities.java19 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/
DAdaptiveIconTest.java32 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/
DRecentsAnimation.cpp32 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()
DListViewAnimation.cpp49 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/
DMediaNotificationProcessorTest.java33 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/core/java/android/view/accessibility/
DCaptioningManager.java26 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/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/
DContrastColorUtil.java28 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/layoutlib/bridge/src/android/graphics/
DColor_Delegate.java31 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/legacy/recents/src/com/android/systemui/recents/utilities/
DUtilities.java28 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/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/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/tests/Internal/src/com/android/internal/colorextraction/types/
DTonalTest.java24 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/packages/EasterEgg/src/com/android/egg/paint/
DPalette.kt19 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()

12345678910>>...16