Home
last modified time | relevance | path

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

12345678

/frameworks/support/v7/palette/src/android/support/v7/graphics/
DColorUtils.java19 import android.graphics.Color;
32 final float alpha1 = Color.alpha(fg) / 255f; in compositeColors()
33 final float alpha2 = Color.alpha(bg) / 255f; in compositeColors()
36 float r = (Color.red(fg) * alpha1) + (Color.red(bg) * alpha2 * (1f - alpha1)); in compositeColors()
37 float g = (Color.green(fg) * alpha1) + (Color.green(bg) * alpha2 * (1f - alpha1)); in compositeColors()
38 float b = (Color.blue(fg) * alpha1) + (Color.blue(bg) * alpha2 * (1f - alpha1)); in compositeColors()
40 return Color.argb((int) a, (int) r, (int) g, (int) b); in compositeColors()
49 double red = Color.red(color) / 255d; in calculateLuminance()
52 double green = Color.green(color) / 255d; in calculateLuminance()
55 double blue = Color.blue(color) / 255d; in calculateLuminance()
[all …]
DColorCutQuantizer.java20 import android.graphics.Color;
219 final int r = Color.red(color); in fitBox()
220 final int g = Color.green(color); in fitBox()
221 final int b = Color.blue(color); in fitBox()
312 if (Color.red(color) >= dimensionMidPoint) { in findSplitPoint()
317 if (Color.green(color) >= dimensionMidPoint) { in findSplitPoint()
322 if (Color.blue(color) > dimensionMidPoint) { in findSplitPoint()
346 redSum += colorPopulation * Color.red(color); in getAverageColor()
347 greenSum += colorPopulation * Color.green(color); in getAverageColor()
348 blueSum += colorPopulation * Color.blue(color); in getAverageColor()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/misc/
DUtilities.java20 import android.graphics.Color;
150 float bgR = Color.red(bg) / 255f; in computeContrastBetweenColors()
151 float bgG = Color.green(bg) / 255f; in computeContrastBetweenColors()
152 float bgB = Color.blue(bg) / 255f; in computeContrastBetweenColors()
158 float fgR = Color.red(fg) / 255f; in computeContrastBetweenColors()
159 float fgG = Color.green(fg) / 255f; in computeContrastBetweenColors()
160 float fgB = Color.blue(fg) / 255f; in computeContrastBetweenColors()
171 return Color.rgb( in getColorWithOverlay()
172 (int) (overlayAlpha * Color.red(baseColor) + in getColorWithOverlay()
173 (1f - overlayAlpha) * Color.red(overlayColor)), in getColorWithOverlay()
[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/base/core/java/android/view/accessibility/
DCaptioningManager.java24 import android.graphics.Color;
352 this.foregroundColor = mHasForegroundColor ? foregroundColor : Color.WHITE; in CaptionStyle()
353 this.backgroundColor = mHasBackgroundColor ? backgroundColor : Color.BLACK; in CaptionStyle()
355 this.edgeColor = mHasEdgeColor ? edgeColor : Color.BLACK; in CaptionStyle()
471 WHITE_ON_BLACK = new CaptionStyle(Color.WHITE, Color.BLACK, EDGE_TYPE_NONE,
472 Color.BLACK, COLOR_NONE_OPAQUE, null);
473 BLACK_ON_WHITE = new CaptionStyle(Color.BLACK, Color.WHITE, EDGE_TYPE_NONE,
474 Color.BLACK, COLOR_NONE_OPAQUE, null);
475 YELLOW_ON_BLACK = new CaptionStyle(Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE,
476 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()
DTintFilter.java27 import android.graphics.Color;
123 float tint_color[] = {Color.red(mTint) / 255f, in updateParameters()
124 Color.green(mTint) / 255f, in updateParameters()
125 Color.blue(mTint) / 255f }; in updateParameters()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DBarTransitions.java24 import android.graphics.Color;
217 mColor = Color.argb( in draw()
218 (int)(v * Color.alpha(targetColor) + Color.alpha(mColorStart) * (1 - v)), in draw()
219 (int)(v * Color.red(targetColor) + Color.red(mColorStart) * (1 - v)), in draw()
220 (int)(v * Color.green(targetColor) + Color.green(mColorStart) * (1 - v)), in draw()
221 (int)(v * Color.blue(targetColor) + Color.blue(mColorStart) * (1 - v))); in draw()
228 if (Color.alpha(mColor) > 0) { in draw()
/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()
DErrorCalculator.java22 import android.graphics.Color;
159 totalError += Math.abs(Color.red(idealColor) - Color.red(givenColor)); in calcError()
160 totalError += Math.abs(Color.green(idealColor) - Color.green(givenColor)); in calcError()
161 totalError += Math.abs(Color.blue(idealColor) - Color.blue(givenColor)); in calcError()
162 totalError += Math.abs(Color.alpha(idealColor) - Color.alpha(givenColor)); in calcError()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DScrimView.java24 import android.graphics.Color;
76 color = Color.argb((int) (Color.alpha(color) * mViewAlpha), Color.red(color), in onDraw()
77 Color.green(color), Color.blue(color)); in onDraw()
89 mIsEmpty = Color.alpha(color) == 0; in setScrimColor()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DShadersActivity.java25 import android.graphics.Color;
85 Color.RED, Color.GREEN, Shader.TileMode.CLAMP); in ShadersView()
93 Color.BLUE, Color.MAGENTA, Shader.TileMode.CLAMP); in ShadersView()
96 Color.YELLOW, Color.MAGENTA, Shader.TileMode.MIRROR); in ShadersView()
DColoredRectsActivity.java23 import android.graphics.Color;
39 final RectsView gpuView = new RectsView(this, 0, Color.GREEN); in onCreate()
41 final RectsView swView = new RectsView(this, 400, Color.RED); in onCreate()
44 final RectsView hwBothView = new RectsView(this, 850, Color.GREEN); in onCreate()
49 final RectsView swBothView = new RectsView(this, 854, Color.RED); in onCreate()
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DSearchOrbView.java24 import android.graphics.Color;
78 this(color, brightColor, Color.TRANSPARENT); in Colors()
114 int red = (int)(Color.red(color) * (1 - sBrightnessAlpha) + brightnessValue); in getBrightColor()
115 int green = (int)(Color.green(color) * (1 - sBrightnessAlpha) + brightnessValue); in getBrightColor()
116 int blue = (int)(Color.blue(color) * (1 - sBrightnessAlpha) + brightnessValue); in getBrightColor()
117 int alpha = (int)(Color.alpha(color) * (1 - sBrightnessAlpha) + brightnessValue); in getBrightColor()
118 return Color.argb(alpha, red, green, blue); in getBrightColor()
191 … int iconColor = a.getColor(R.styleable.lbSearchOrbView_searchOrbIconColor, Color.TRANSPARENT); in SearchOrbView()
288 setOrbColors(new Colors(color, color, Color.TRANSPARENT)); in setOrbColor()
298 setOrbColors(new Colors(color, brightColor, Color.TRANSPARENT)); in setOrbColor()
/frameworks/testing/espresso/espresso-sample/src/main/java/com/google/android/apps/common/testing/ui/testapp/
DSimplePagerAdapter.java19 import android.graphics.Color;
29 Color.BLUE,
30 Color.RED,
31 Color.YELLOW,
/frameworks/base/services/core/java/com/android/server/wm/
DStrictModeFlash.java21 import android.graphics.Color;
78 c.drawColor(Color.RED); in drawIfNeeded()
81 c.drawColor(Color.RED); in drawIfNeeded()
84 c.drawColor(Color.RED); in drawIfNeeded()
87 c.drawColor(Color.RED); in drawIfNeeded()
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/
DBitmapTest.java207 int a0 = Color.alpha(c0); in testSetPixelsWithNonOpaqueAlpha()
208 int a1 = Color.alpha(c1); in testSetPixelsWithNonOpaqueAlpha()
211 int r0 = Color.red(c0); in testSetPixelsWithNonOpaqueAlpha()
212 int r1 = Color.red(c1); in testSetPixelsWithNonOpaqueAlpha()
216 int g0 = Color.green(c0); in testSetPixelsWithNonOpaqueAlpha()
217 int g1 = Color.green(c1); in testSetPixelsWithNonOpaqueAlpha()
221 int b0 = Color.blue(c0); in testSetPixelsWithNonOpaqueAlpha()
222 int b1 = Color.blue(c1); in testSetPixelsWithNonOpaqueAlpha()
227 int cc = Color.argb(a0, rr, gg, bb); in testSetPixelsWithNonOpaqueAlpha()
/frameworks/opt/colorpicker/src/com/android/colorpicker/
DHsvColorComparator.java19 import android.graphics.Color;
31 Color.colorToHSV(lhs, hsv); in compare()
37 Color.colorToHSV(rhs, hsv2); in compare()
DColorStateDrawable.java19 import android.graphics.Color;
63 Color.colorToHSV(color, hsv); in getPressedColor()
65 return Color.HSVToColor(hsv); in getPressedColor()
/frameworks/base/tests/TransitionTests/src/com/android/transitiontests/
DSurfaceAndTextureViews.java21 import android.graphics.Color;
104 static final int SMALL_COLOR = Color.BLUE;
105 static final int LARGE_COLOR = Color.YELLOW;
120 static final int SMALL_COLOR = Color.GREEN;
121 static final int LARGE_COLOR = Color.GRAY;
153 static final int SMALL_COLOR = Color.RED;
154 static final int LARGE_COLOR = Color.CYAN;
/frameworks/base/core/java/com/android/internal/util/
DNotificationColorUtil.java23 import android.graphics.Color;
205 return Color.argb(Color.alpha(color), in processColor()
206 255 - Color.red(color), in processColor()
207 255 - Color.green(color), in processColor()
208 255 - Color.blue(color)); in processColor()
/frameworks/base/packages/Keyguard/src/com/android/keyguard/
DKeyguardCircleFramedDrawable.java21 import android.graphics.Color;
82 mPaint.setColor(Color.BLACK); in KeyguardCircleFramedDrawable()
126 mPaint.setColor(Color.argb((int) (0.33f * 255), in draw()
127 Color.red(mHighlightColor), in draw()
128 Color.green(mHighlightColor), in draw()
129 Color.blue(mHighlightColor))); in draw()
/frameworks/base/packages/WallpaperCropper/src/com/android/photos/views/
DTiledImageView.java24 import android.graphics.Color;
328 Color.RED,
329 Color.BLUE,
330 Color.YELLOW,
331 Color.GREEN,
332 Color.CYAN,
333 Color.MAGENTA,
334 Color.WHITE,
369 mPaint.setColor(Color.BLACK); in getTile()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DKeyguardUserSwitcherScrim.java20 import android.graphics.Color;
106 new int[] { Color.argb( in updatePaint()
107 (int) (Color.alpha(mDarkColor) * mAlpha / 255f), 0, 0, 0), in updatePaint()
108 Color.TRANSPARENT }, in updatePaint()

12345678