Home
last modified time | relevance | path

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

12345678910>>...21

/frameworks/base/graphics/java/android/graphics/
DColor.java453 float[] color = new float[] { in convert() local
456 connector.transform(color); in convert()
457 return new Color(color, colorSpace); in convert()
476 float[] color = new float[] { in toArgb() local
480 ColorSpace.connect(mColorSpace).transform(color); in toArgb()
482 return ((int) (color[3] * 255.0f + 0.5f) << 24) | in toArgb()
483 ((int) (color[0] * 255.0f + 0.5f) << 16) | in toArgb()
484 ((int) (color[1] * 255.0f + 0.5f) << 8) | in toArgb()
485 (int) (color[2] * 255.0f + 0.5f); in toArgb()
646 Color color = (Color) o; in equals()
[all …]
/frameworks/base/core/java/com/android/internal/graphics/palette/
DColorCutQuantizer.java110 for (int color = 0; color < hist.length; color++) { in quantize()
111 if (hist[color] > 0 && shouldIgnoreColor(color)) { in quantize()
113 hist[color] = 0; in quantize()
115 if (hist[color] > 0) { in quantize()
128 for (int color = 0; color < hist.length; color++) { in quantize()
129 if (hist[color] > 0) { in quantize()
130 colors[distinctColorIndex++] = color; in quantize()
141 for (int color : colors) { in quantize()
142 mQuantizedColors.add(new Swatch(approximateToRgb888(color), hist[color])); in quantize()
276 final int color = colors[i]; in fitBox() local
[all …]
/frameworks/base/libs/hwui/
DCanvasTransform.cpp35 static SkColor makeLight(SkColor color) { in makeLight() argument
36 Lab lab = sRGBToLab(color); in makeLight()
40 return LabToSRGB(lab, SkColorGetA(color)); in makeLight()
42 return color; in makeLight()
46 static SkColor makeDark(SkColor color) { in makeDark() argument
47 Lab lab = sRGBToLab(color); in makeDark()
51 return LabToSRGB(lab, SkColorGetA(color)); in makeDark()
53 return color; in makeDark()
57 static SkColor transformColor(ColorTransform transform, SkColor color) { in transformColor() argument
60 return makeLight(color); in transformColor()
[all …]
/frameworks/native/services/surfaceflinger/
DColorLayer.cpp57 half4 color(getColor()); in prepareClientLayer() local
58 half3 solidColor(color.r, color.g, color.b); in prepareClientLayer()
67 bool ColorLayer::setColor(const half3& color) { in setColor() argument
68 if (mCurrentState.color.r == color.r && mCurrentState.color.g == color.g && in setColor()
69 mCurrentState.color.b == color.b) { in setColor()
74 mCurrentState.color.r = color.r; in setColor()
75 mCurrentState.color.g = color.g; in setColor()
76 mCurrentState.color.b = color.b; in setColor()
129 half4 color = getColor(); in setPerFrameData() local
130 error = hwcLayer->setColor({static_cast<uint8_t>(std::round(255.0f * color.r)), in setPerFrameData()
[all …]
/frameworks/rs/tests/java_api/LivePreview/src/com/android/rs/livepreview/
Dyuv.rscript14 static float4 crossProcess(float4 color) {
18 if (color.r < 0.5f) {
19 v = color.r;
22 v = 1.0f - color.r;
26 if (color.g < 0.5f) {
27 v = color.g;
30 v = 1.0f - color.g;
34 ncolor.b = color.b * 0.5f + 0.25f;
35 ncolor.a = color.a;
39 static uchar4 crossProcess_i(uchar4 color) {
[all …]
/frameworks/wilhelm/src/itf/
DILEDArray.cpp63 SLHSL color = *pColor; in ILEDArray_SetColor() local
64 if (!(0 <= color.hue && color.hue <= 360000)) in ILEDArray_SetColor()
66 if (!(0 <= color.saturation && color.saturation <= 1000)) in ILEDArray_SetColor()
68 if (!(0 <= color.lightness && color.lightness <= 1000)) in ILEDArray_SetColor()
73 thiz->mColors[index] = color; in ILEDArray_SetColor()
92 SLHSL color = thiz->mColors[index]; in ILEDArray_GetColor() local
94 *pColor = color; in ILEDArray_GetColor()
114 SLHSL *color = thiz->mColors; in ILEDArray_init() local
116 for (index = 0; index < MAX_LED_COUNT; ++index, ++color) { in ILEDArray_init()
117 color->hue = 0; // red, but per specification 1.0.1 pg. 259: "Default color is undefined." in ILEDArray_init()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DContrastColorUtil.java283 private int processColor(int color) { in processColor() argument
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()
300 public static int findContrastColor(int color, int other, boolean findFg, double minRatio) { in findContrastColor() argument
301 int fg = findFg ? color : other; in findContrastColor()
302 int bg = findFg ? other : color; in findContrastColor()
304 return color; in findContrastColor()
336 public static int findAlphaToMeetContrast(int color, int backgroundColor, double minRatio) { in findAlphaToMeetContrast() argument
[all …]
DUserIcons.java34 R.color.user_icon_1,
35 R.color.user_icon_2,
36 R.color.user_icon_3,
37 R.color.user_icon_4,
38 R.color.user_icon_5,
39 R.color.user_icon_6,
40 R.color.user_icon_7,
41 R.color.user_icon_8
70 int colorResId = light ? R.color.user_icon_default_white : R.color.user_icon_default_gray; in getDefaultUserIcon()
/frameworks/base/core/tests/coretests/src/android/graphics/
DColorStateListTest.java40 mFailureColor = mResources.getColor(R.color.failColor); in setUp()
45 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1); in testStateIsInList()
47 int focusColor = colorStateList.getColorForState(focusedState, R.color.failColor); in testStateIsInList()
48 assertEquals(mResources.getColor(R.color.testcolor1), focusColor); in testStateIsInList()
53 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1); in testEmptyState()
56 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testEmptyState()
61 int defaultColor = mResources.getColor(R.color.color1); in testGetColor()
62 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testGetColor()
67 int defaultColor = mResources.getColor(R.color.color_no_default); in testGetColorWhenListHasNoDefault()
68 assertEquals(mResources.getColor(R.color.testcolor1), defaultColor); in testGetColorWhenListHasNoDefault()
/frameworks/base/startop/apps/ColorChanging/app/src/main/java/com/android/startop/colorchanging/
DMainActivity.java33 view.setBackgroundResource(R.color.gray); in onCreate()
39 view.setBackgroundResource(R.color.red); in goRed()
45 view.setBackgroundResource(R.color.orange); in goOrange()
51 view.setBackgroundResource(R.color.yellow); in goYellow()
57 view.setBackgroundResource(R.color.green); in goGreen()
63 view.setBackgroundResource(R.color.blue); in goBlue()
69 view.setBackgroundResource(R.color.indigo); in goIndigo()
75 view.setBackgroundResource(R.color.violet); in goViolet()
81 view.setBackgroundResource(R.color.cyan); in goCyan()
87 view.setBackgroundResource(R.color.black); in goBlack()
/frameworks/base/core/java/android/widget/
DCalendarView.java170 public void setSelectedWeekBackgroundColor(@ColorInt int color) { in setSelectedWeekBackgroundColor() argument
171 mDelegate.setSelectedWeekBackgroundColor(color); in setSelectedWeekBackgroundColor()
198 public void setFocusedMonthDateColor(@ColorInt int color) { in setFocusedMonthDateColor() argument
199 mDelegate.setFocusedMonthDateColor(color); in setFocusedMonthDateColor()
226 public void setUnfocusedMonthDateColor(@ColorInt int color) { in setUnfocusedMonthDateColor() argument
227 mDelegate.setUnfocusedMonthDateColor(color); in setUnfocusedMonthDateColor()
254 public void setWeekNumberColor(@ColorInt int color) { in setWeekNumberColor() argument
255 mDelegate.setWeekNumberColor(color); in setWeekNumberColor()
282 public void setWeekSeparatorLineColor(@ColorInt int color) { in setWeekSeparatorLineColor() argument
283 mDelegate.setWeekSeparatorLineColor(color); in setWeekSeparatorLineColor()
[all …]
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/template/
DProgressBarMixin.java34 @Nullable private ColorStateList color; field in ProgressBarMixin
82 setColor(color); in getProgressBar()
100 public void setColor(@Nullable ColorStateList color) { in setColor() argument
101 this.color = color; in setColor()
105 bar.setIndeterminateTintList(color); in setColor()
106 if (Build.VERSION.SDK_INT >= VERSION_CODES.M || color != null) { in setColor()
113 bar.setProgressBackgroundTintList(color); in setColor()
125 return color; in getColor()
/frameworks/base/core/jni/
Dandroid_graphics_ColorSpace.cpp50 SkColor4f GraphicsJNI::convertColorLong(jlong color) { in convertColorLong() argument
51 if ((color & 0x3f) == 0) { in convertColorLong()
53 uint8_t a = color >> 56 & 0xff; in convertColorLong()
54 uint8_t r = color >> 48 & 0xff; in convertColorLong()
55 uint8_t g = color >> 40 & 0xff; in convertColorLong()
56 uint8_t b = color >> 32 & 0xff; in convertColorLong()
62 float r = halfToFloat((uint16_t)(color >> 48 & 0xffff)); in convertColorLong()
63 float g = halfToFloat((uint16_t)(color >> 32 & 0xffff)); in convertColorLong()
64 float b = halfToFloat((uint16_t)(color >> 16 & 0xffff)); in convertColorLong()
65 float a = (color >> 6 & 0x3ff) / 1023.0f; in convertColorLong()
/frameworks/base/docs/html/sdk/support_api_diff/25.1.0/
Dstylesheet-jdiff.css6 .diffspechead {background-color:#eee;}
8 … {background-color:eee;border:0px;font-size:90%;font-weight:normal;padding:0px;padding-left:1px;p…
9 td.diffvalueold {color:orange;background-color:white;border:0px;font-size:80%;font-style:normal;tex…
10 td.diffvaluenew {color:green;background-color:white;border:0px;font-size:80%;font-weight:normal;tex…
11 td.diffvalue {color:444;background-color:white;border:0px;font-size:80%;font-weight:normal;text-ali…
12 td.diffspec {background-color:white;border:0px;font-size:80%;font-weight:normal;padding:1px;color:4…
/frameworks/base/docs/html/sdk/support_api_diff/25.0.0/
Dstylesheet-jdiff.css6 .diffspechead {background-color:#eee;}
8 … {background-color:eee;border:0px;font-size:90%;font-weight:normal;padding:0px;padding-left:1px;p…
9 td.diffvalueold {color:orange;background-color:white;border:0px;font-size:80%;font-style:normal;tex…
10 td.diffvaluenew {color:green;background-color:white;border:0px;font-size:80%;font-weight:normal;tex…
11 td.diffvalue {color:444;background-color:white;border:0px;font-size:80%;font-weight:normal;text-ali…
12 td.diffspec {background-color:white;border:0px;font-size:80%;font-weight:normal;padding:1px;color:4…
/frameworks/native/opengl/tests/hwc/
DhwcTestLib.cpp307 ColorFract color; in hwcTestParseColor() local
317 if (!in || ((chStart != '<') && (chStart != '['))) { return color; } in hwcTestParseColor()
321 if (!in) { return color; } in hwcTestParseColor()
322 if ((c1 < 0.0) || (c1 > 1.0)) { return color; } in hwcTestParseColor()
324 if (!in || (ch != ',')) { return color; } in hwcTestParseColor()
328 if (!in) { return color; } in hwcTestParseColor()
329 if ((c2 < 0.0) || (c2 > 1.0)) { return color; } in hwcTestParseColor()
331 if (!in || (ch != ',')) { return color; } in hwcTestParseColor()
335 if (!in) { return color; } in hwcTestParseColor()
336 if ((c3 < 0.0) || (c3 > 1.0)) { return color; } in hwcTestParseColor()
[all …]
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/
DBrushPropertyDrawable.kt27 it.color = Color.BLACK in <lambda>()
31 it.color = Color.RED in <lambda>()
42 fun setFrameColor(color: Int) { in setFrameColor()
43 framePaint.color = color in setFrameColor()
47 fun setWellColor(color: Int) { in setWellColor()
48 wellPaint.color = color in setWellColor()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/
DTileColorPickerTest.java45 getColorStateList(R.color.tint_color_selector, mContext.getTheme()); in setUp()
50 final int color = mTileColorPicker.getColor(Tile.STATE_UNAVAILABLE); in testGetColor_StateUnavailable_ReturnUnavailableColor() local
54 assertEquals(expectedColor, color); in testGetColor_StateUnavailable_ReturnUnavailableColor()
59 final int color = mTileColorPicker.getColor(Tile.STATE_INACTIVE); in testGetColor_StateInactive_ReturnInactiveColor() local
63 assertEquals(expectedColor, color); in testGetColor_StateInactive_ReturnInactiveColor()
68 final int color = mTileColorPicker.getColor(Tile.STATE_ACTIVE); in testGetColor_StateActive_ReturnActiveColor() local
72 assertEquals(expectedColor, color); in testGetColor_StateActive_ReturnActiveColor()
/frameworks/base/services/core/java/com/android/server/lights/
DLightsService.java281 int color = brightness & 0x000000ff; in setBrightness() local
282 color = 0xff000000 | (color << 16) | (color << 8) | color; in setBrightness()
283 setLightLocked(color, LIGHT_FLASH_NONE, 0, 0, brightnessMode); in setBrightness()
289 public void setColor(int color) { in setColor() argument
291 setLightLocked(color, LIGHT_FLASH_NONE, 0, 0, 0); in setColor()
296 public void setFlashing(int color, int mode, int onMS, int offMS) { in setFlashing() argument
298 setLightLocked(color, mode, onMS, offMS, BRIGHTNESS_MODE_USER); in setFlashing()
308 public void pulse(int color, int onMS) { in pulse() argument
311 setLightLocked(color, LIGHT_FLASH_HARDWARE, onMS, 1000, in pulse()
352 private void setLightLocked(int color, int mode, int onMS, int offMS, int brightnessMode) { in setLightLocked() argument
[all …]
/frameworks/native/opengl/libagl/
Dvertex.cpp36 c->current.color.r = 0x10000; in ogles_init_vertex()
37 c->current.color.g = 0x10000; in ogles_init_vertex()
38 c->current.color.b = 0x10000; in ogles_init_vertex()
39 c->current.color.a = 0x10000; in ogles_init_vertex()
190 c->current.color.r = gglFloatToFixed(r); in glColor4f()
191 c->currentColorClamped.r = gglClampx(c->current.color.r); in glColor4f()
192 c->current.color.g = gglFloatToFixed(g); in glColor4f()
193 c->currentColorClamped.g = gglClampx(c->current.color.g); in glColor4f()
194 c->current.color.b = gglFloatToFixed(b); in glColor4f()
195 c->currentColorClamped.b = gglClampx(c->current.color.b); in glColor4f()
[all …]
/frameworks/native/cmds/surfacereplayer/replayer/
DBufferQueueScheduler.cpp26 const sp<SurfaceControl>& surfaceControl, const HSV& color, int id) in BufferQueueScheduler() argument
27 : mSurfaceControl(surfaceControl), mColor(color), mSurfaceId(id), mContinueScheduling(true) {} in BufferQueueScheduler()
68 const sp<SurfaceControl>& surfaceControl, const HSV& color) { in setSurfaceControl() argument
71 mColor = color; in setSurfaceControl()
91 auto color = mColor.getRGB(); in fillSurface() local
97 pixel[0] = color.r; in fillSurface()
98 pixel[1] = color.g; in fillSurface()
99 pixel[2] = color.b; in fillSurface()
/frameworks/native/services/vr/hardware_composer/aidl/android/dvr/
Dparcelable_composer_layer.cpp78 uint32_t color = layer_.color.r | in writeToParcel() local
79 (static_cast<uint32_t>(layer_.color.g) << 8) | in writeToParcel()
80 (static_cast<uint32_t>(layer_.color.b) << 16) | in writeToParcel()
81 (static_cast<uint32_t>(layer_.color.a) << 24); in writeToParcel()
82 ret = parcel->writeUint32(color); in writeToParcel()
181 uint32_t color; in readFromParcel() local
182 ret = parcel->readUint32(&color); in readFromParcel()
184 layer_.color.r = color & 0xFF; in readFromParcel()
185 layer_.color.g = (color >> 8) & 0xFF; in readFromParcel()
186 layer_.color.b = (color >> 16) & 0xFF; in readFromParcel()
[all …]
/frameworks/opt/colorpicker/src/com/android/colorpicker/
DColorPickerSwatch.java43 public void onColorSelected(int color); in onColorSelected() argument
46 public ColorPickerSwatch(Context context, int color, boolean checked, in ColorPickerSwatch() argument
49 mColor = color; in ColorPickerSwatch()
55 setColor(color); in ColorPickerSwatch()
60 protected void setColor(int color) { in setColor() argument
63 mSwatchImage.setImageDrawable(new ColorStateDrawable(colorDrawable, color)); in setColor()
/frameworks/rs/driver/runtime/
Drs_convert.c66 float4 color = (float)y * 0.003921569f; in rsYuvToRGBA_float4() local
70 color += fU * yuv_U_values; in rsYuvToRGBA_float4()
71 color += fV * yuv_V_values; in rsYuvToRGBA_float4()
72 color = clamp(color, 0.f, 1.f); in rsYuvToRGBA_float4()
73 return color; in rsYuvToRGBA_float4()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/
DGlifPatternDrawable.java95 private int color; field in GlifPatternDrawable
98 public GlifPatternDrawable(int color) { in GlifPatternDrawable() argument
99 setColor(color); in GlifPatternDrawable()
142 canvas.drawColor(color); in draw()
282 public void setColor(int color) { in setColor() argument
283 final int r = Color.red(color); in setColor()
284 final int g = Color.green(color); in setColor()
285 final int b = Color.blue(color); in setColor()
286 this.color = Color.argb(COLOR_ALPHA_INT, r, g, b); in setColor()
295 return Color.argb(255, Color.red(color), Color.green(color), Color.blue(color)); in getColor()

12345678910>>...21