Searched refs:color (Results 1 - 25 of 536) sorted by relevance

1234567891011>>

/frameworks/data-binding/extensions/baseAdapters/src/main/java/android/databinding/adapters/
H A DConverters.java24 public static ColorDrawable convertColorToDrawable(int color) { argument
25 return new ColorDrawable(color);
29 public static ColorStateList convertColorToColorStateList(int color) { argument
30 return ColorStateList.valueOf(color);
/frameworks/wilhelm/src/itf/
H A DILEDArray.cpp63 SLHSL color = *pColor; local
64 if (!(0 <= color.hue && color.hue <= 360000))
66 if (!(0 <= color.saturation && color.saturation <= 1000))
68 if (!(0 <= color.lightness && color.lightness <= 1000))
73 thiz->mColors[index] = color;
92 SLHSL color = thiz->mColors[index]; local
94 *pColor = color;
114 SLHSL *color = thiz->mColors; local
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DColor.java52 * <p>A color int always defines a color in the {@link ColorSpace.Named#SRGB sRGB}
53 * color space using 4 components packed in a single 32 bit integer value:</p>
66 * which is why color ints are called ARGB colors.</p>
69 * <p>To avoid confusing color ints with arbitrary integer values, it is a
74 * <p>The four components of a color int are encoded in the following way:</p>
76 * int color = (A & 0xff) << 24 | (R & 0xff) << 16 | (G & 0xff) << 16 | (B & 0xff);
79 * <p>Because of this encoding, color ints can easily be described as an integer
83 * <p>To easily encode color ints, it is recommended to use the static methods
85 * method omits the alpha component and assumes the color i
703 colorSpace(@olorLong long color) argument
722 red(@olorLong long color) argument
742 green(@olorLong long color) argument
762 blue(@olorLong long color) argument
779 alpha(@olorLong long color) argument
795 isSrgb(@olorLong long color) argument
812 isWideGamut(@olorLong long color) argument
826 isInColorSpace(@olorLong long color, @NonNull ColorSpace colorSpace) argument
839 toArgb(@olorLong long color) argument
865 valueOf(@olorInt int color) argument
882 valueOf(@olorLong long color) argument
982 pack(@olorInt int color) argument
1086 convert(@olorInt int color, @NonNull ColorSpace colorSpace) argument
1110 convert(@olorLong long color, @NonNull ColorSpace colorSpace) argument
1167 convert(@olorLong long color, @NonNull ColorSpace.Connector connector) argument
1216 luminance(@olorLong long color) argument
1240 alpha(int color) argument
1249 red(int color) argument
1258 green(int color) argument
1267 blue(int color) argument
1353 luminance(@olorInt int color) argument
1435 colorToHSV(@olorInt int color, @Size(3) float hsv[]) argument
1489 getHtmlColor(@onNull String color) argument
[all...]
H A DPorterDuffColorFilter.java23 * A color filter that can be used to tint the source pixels using a single
24 * color and a specific {@link PorterDuff Porter-Duff composite mode}.
32 * Create a color filter that uses the specified color and Porter-Duff mode.
34 * @param color The ARGB source color used with the specified Porter-Duff mode
41 public PorterDuffColorFilter(@ColorInt int color, @NonNull PorterDuff.Mode mode) { argument
42 mColor = color;
47 * Returns the ARGB color used to tint the source pixels when this filter
61 * Specifies the color t
72 setColor(@olorInt int color) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/graphics/
H A DColorStateListTest.java39 mFailureColor = mResources.getColor(R.color.failColor);
44 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1);
46 int focusColor = colorStateList.getColorForState(focusedState, R.color.failColor);
47 assertEquals(mResources.getColor(R.color.testcolor1), focusColor);
52 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1);
55 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor);
60 int defaultColor = mResources.getColor(R.color.color1);
61 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor);
66 int defaultColor = mResources.getColor(R.color.color_no_default);
67 assertEquals(mResources.getColor(R.color
[all...]
/frameworks/base/libs/hwui/
H A DFloatColor.h29 // "color" is a gamma-encoded sRGB color
30 // After calling this method, the color is stored as a pre-multiplied linear color
31 // if linear blending is enabled. Otherwise, the color is stored as a pre-multiplied
32 // gamma-encoded sRGB color
33 void set(uint32_t color) { argument
34 a = ((color >> 24) & 0xff) / 255.0f;
35 r = a * EOCF(((color >> 16) & 0xff) / 255.0f);
36 g = a * EOCF(((color >>
44 setUnPreMultiplied(uint32_t color) argument
[all...]
/frameworks/base/core/java/com/android/internal/graphics/palette/
H A DColorCutQuantizer.java52 * An color quantizer based on the Median-cut algorithm, but optimized for picking out distinct
55 * The color space is represented as a 3-dimensional cube with each dimension being an RGB
56 * component. The cube is then repeatedly divided until we have reduced the color space to the
57 * requested number of colors. An average color is then generated from each cube.
60 * have roughly the same population, where this quantizer divides boxes based on their color volume.
61 * This means that the color space is divided into distinct colors, rather than representative
85 * Execute color quantization.
110 for (int color = 0; color < hist.length; color
456 shouldIgnoreColor(Swatch color) argument
484 quantizeFromRgb888(int color) argument
500 approximateToRgb888(int color) argument
507 quantizedRed(int color) argument
514 quantizedGreen(int color) argument
521 quantizedBlue(int color) argument
[all...]
/frameworks/support/v7/palette/src/main/java/android/support/v7/graphics/
H A DColorCutQuantizer.java32 * An color quantizer based on the Median-cut algorithm, but optimized for picking out distinct
35 * The color space is represented as a 3-dimensional cube with each dimension being an RGB
36 * component. The cube is then repeatedly divided until we have reduced the color space to the
37 * requested number of colors. An average color is then generated from each cube.
40 * have roughly the same population, where this quantizer divides boxes based on their color volume.
41 * This means that the color space is divided into distinct colors, rather than representative
90 for (int color = 0; color < hist.length; color++) {
91 if (hist[color] >
436 shouldIgnoreColor(Swatch color) argument
464 quantizeFromRgb888(int color) argument
480 approximateToRgb888(int color) argument
487 quantizedRed(int color) argument
494 quantizedGreen(int color) argument
501 quantizedBlue(int color) argument
[all...]
/frameworks/support/design/tests/src/android/support/design/testutils/
H A DTestDrawable.java34 public TestDrawable(@ColorInt int color, int width, int height) { argument
35 super(Orientation.TOP_BOTTOM, new int[] { color, color });
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
H A DTextAttribute.java34 public TextColor color; field in class:TextAttribute
38 boolean strikeThrough, TextColor color) {
47 this.color = color;
36 TextAttribute(int start, int length, TextAlignment align, FontSize size, boolean bold, boolean italic, boolean underlined, boolean strikeThrough, TextColor color) argument
/frameworks/support/v17/leanback/src/android/support/v17/leanback/graphics/
H A DColorFilterCache.java23 * Cache of {@link ColorFilter}s for a given color at different alpha levels.
33 * Get a ColorDimmer for a given color. Only the RGB values are used; the
34 * alpha channel is ignored in color. Subsequent calls to this method
35 * with the same color value will return the same cache.
37 * @param color The color to use for the color filters.
38 * @return A cache of ColorFilters at different alpha levels for the color.
40 public static ColorFilterCache getColorFilterCache(int color) { argument
41 final int r = Color.red(color);
[all...]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/
H A DGLPaint.java25 public void setColor(int color) { argument
26 mColor = color;
/frameworks/base/core/java/com/android/internal/util/
H A 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
68 int colorResId = light ? R.color.user_icon_default_white : R.color
[all...]
/frameworks/base/services/core/java/com/android/server/lights/
H A DLightsService.java55 int color = brightness & 0x000000ff;
56 color = 0xff000000 | (color << 16) | (color << 8) | color;
57 setLightLocked(color, LIGHT_FLASH_NONE, 0, 0, brightnessMode);
62 public void setColor(int color) { argument
64 setLightLocked(color, LIGHT_FLASH_NONE, 0, 0, 0);
69 public void setFlashing(int color, int mode, int onMS, int offMS) { argument
71 setLightLocked(color, mod
81 pulse(int color, int onMS) argument
125 setLightLocked(int color, int mode, int onMS, int offMS, int brightnessMode) argument
215 setLight_native(int light, int color, int mode, int onMS, int offMS, int brightnessMode) argument
[all...]
H A DLight.java44 public abstract void setColor(int color); argument
45 public abstract void setFlashing(int color, int mode, int onMS, int offMS); argument
47 public abstract void pulse(int color, int onMS); argument
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/
H A DTileColorPickerTest.java42 getColorStateList(R.color.tint_color_selector, mContext.getTheme());
47 final int color = mTileColorPicker.getColor(Tile.STATE_UNAVAILABLE);
51 assertEquals(expectedColor, color);
56 final int color = mTileColorPicker.getColor(Tile.STATE_INACTIVE);
60 assertEquals(expectedColor, color);
65 final int color = mTileColorPicker.getColor(Tile.STATE_ACTIVE);
69 assertEquals(expectedColor, color);
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
H A DSearchOrbView.java39 * The background color and icon can be customized.
64 * Constructs a color set using the given color for the search orb.
67 * @param color The main search orb color.
69 public Colors(@ColorInt int color) { argument
70 this(color, color);
74 * Constructs a color set using the given colors for the search orb.
77 * @param color Th
80 Colors(@olorInt int color, @ColorInt int brightColor) argument
91 Colors(@olorInt int color, @ColorInt int brightColor, @ColorInt int iconColor) argument
101 public int color; field in class:SearchOrbView.Colors
118 getBrightColor(int color) argument
288 setOrbColor(int color) argument
298 setOrbColor(@olorInt int color, @ColorInt int brightColor) argument
362 setOrbViewColor(int color) argument
[all...]
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
H A DSecurityMessageDisplay.java21 void setNextMessageColor(int color); argument
/frameworks/opt/colorpicker/src/com/android/colorpicker/
H A DColorStateDrawable.java25 * A drawable which sets its color filter to a color specified by the user, and changes to a
26 * slightly darker color when pressed or focused.
34 public ColorStateDrawable(Drawable[] layers, int color) { argument
36 mColor = color;
59 * Given a particular color, adjusts its value by a multiplier.
61 private static int getPressedColor(int color) { argument
63 Color.colorToHSV(color, hsv);
H A DColorPickerSwatch.java27 * Creates a circular swatch of a specified color. Adds a checkmark if marked as checked.
36 * Interface for a callback when a color square is selected.
41 * Called when a specific color square has been selected.
43 public void onColorSelected(int color); argument
46 public ColorPickerSwatch(Context context, int color, boolean checked, argument
49 mColor = color;
55 setColor(color);
60 protected void setColor(int color) { argument
63 mSwatchImage.setImageDrawable(new ColorStateDrawable(colorDrawable, color));
/frameworks/layoutlib/bridge/tests/res/testApp/MyApplication/build/intermediates/classes/debug/com/android/layoutlib/test/myapplication/
H A DR$color.class ... android.layoutlib.test.myapplication.R$color extends java.lang.Object { public static final int ...
/frameworks/support/customtabs/tests/src/android/support/customtabs/
H A DCustomTabsIntentTest.java60 int color = Color.RED;
61 Intent intent = new CustomTabsIntent.Builder().setToolbarColor(color).build().intent;
63 assertEquals(color, intent.getIntExtra(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, 0));
68 @ColorRes int colorId = android.R.color.background_dark;
69 int color = InstrumentationRegistry.getContext().getResources().getColor(colorId);
71 assertFalse("The color should not be a resource ID",
72 color == intent.getIntExtra(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, 0));
73 intent = new CustomTabsIntent.Builder().setToolbarColor(color).build().intent;
74 assertEquals(color, intent.getIntExtra(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, 0));
/frameworks/rs/driver/runtime/
H A Drs_convert.c66 float4 color = (float)y * 0.003921569f; local
70 color += fU * yuv_U_values;
71 color += fV * yuv_V_values;
72 color = clamp(color, 0.f, 1.f);
73 return color;
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/
H A Dposterize.rs24 uchar4 color;
31 color = hats;
38 return color;
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/
H A Dposterize.rs24 uchar4 color;
31 color = hats;
38 return color;

Completed in 1588 milliseconds

1234567891011>>