/frameworks/data-binding/extensions/baseAdapters/src/main/java/android/databinding/adapters/ |
H A D | Converters.java | 24 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 D | ILEDArray.cpp | 63 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 D | Color.java | 52 * <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) << 8 | (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 D | PorterDuffColorFilter.java | 23 * 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 D | ColorStateListTest.java | 39 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 D | FloatColor.h | 29 // "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 D | ColorCutQuantizer.java | 52 * 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/palette/src/main/java/androidx/palette/graphics/ |
H A D | ColorCutQuantizer.java | 33 * An color quantizer based on the Median-cut algorithm, but optimized for picking out distinct 36 * The color space is represented as a 3-dimensional cube with each dimension being an RGB 37 * component. The cube is then repeatedly divided until we have reduced the color space to the 38 * requested number of colors. An average color is then generated from each cube. 41 * have roughly the same population, where this quantizer divides boxes based on their color volume. 42 * This means that the color space is divided into distinct colors, rather than representative 92 for (int color = 0; color < hist.length; color++) { 93 if (hist[color] > 439 shouldIgnoreColor(Palette.Swatch color) argument 467 quantizeFromRgb888(int color) argument 483 approximateToRgb888(int color) argument 490 quantizedRed(int color) argument 497 quantizedGreen(int color) argument 504 quantizedBlue(int color) argument [all...] |
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/ |
H A D | TextAttribute.java | 34 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/leanback/src/main/java/androidx/leanback/graphics/ |
H A D | ColorFilterCache.java | 23 * 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/SystemUI/src/com/android/systemui/statusbar/ |
H A D | StatusIconDisplayable.java | 23 void setStaticDrawableColor(int color); argument 24 void setDecorColor(int color); argument
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/ |
H A D | GLPaint.java | 25 public void setColor(int color) { argument 26 mColor = color;
|
/frameworks/base/core/java/com/android/internal/util/ |
H A D | UserIcons.java | 34 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 65 * @param resources resources object to fetch user icon / color. 70 int colorResId = light ? R.color [all...] |
/frameworks/base/services/core/java/com/android/server/lights/ |
H A D | LightsService.java | 55 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 D | Light.java | 44 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 D | TileColorPickerTest.java | 42 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/leanback/src/main/java/androidx/leanback/widget/ |
H A D | SearchOrbView.java | 41 * The background color and icon can be customized. 66 * Constructs a color set using the given color for the search orb. 69 * @param color The main search orb color. 71 public Colors(@ColorInt int color) { argument 72 this(color, color); 76 * Constructs a color set using the given colors for the search orb. 79 * @param color Th 82 Colors(@olorInt int color, @ColorInt int brightColor) argument 93 Colors(@olorInt int color, @ColorInt int brightColor, @ColorInt int iconColor) argument 103 public int color; field in class:SearchOrbView.Colors 120 getBrightColor(int color) argument 289 setOrbColor(int color) argument 299 setOrbColor(@olorInt int color, @ColorInt int brightColor) argument 363 setOrbViewColor(int color) argument [all...] |
/frameworks/base/packages/SystemUI/src/com/android/keyguard/ |
H A D | SecurityMessageDisplay.java | 21 void setNextMessageColor(int color); argument
|
/frameworks/opt/colorpicker/src/com/android/colorpicker/ |
H A D | ColorStateDrawable.java | 25 * 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 D | ColorPickerSwatch.java | 27 * 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/support/core/ktx/src/main/java/androidx/core/graphics/ |
H A D | PorterDuff.kt | 33 * alpha compositing or blending mode, and the specified [color]. 35 inline fun PorterDuff.Mode.toColorFilter(color: Int) = PorterDuffColorFilter(color, this)
|
/frameworks/support/browser/src/androidTest/java/androidx/browser/customtabs/ |
H A D | CustomTabsIntentTest.java | 61 int color = Color.RED; 62 Intent intent = new CustomTabsIntent.Builder().setToolbarColor(color).build().intent; 64 assertEquals(color, intent.getIntExtra(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, 0)); 69 @ColorRes int colorId = android.R.color.background_dark; 70 int color = InstrumentationRegistry.getContext().getResources().getColor(colorId); 72 assertFalse("The color should not be a resource ID", 73 color == intent.getIntExtra(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, 0)); 74 intent = new CustomTabsIntent.Builder().setToolbarColor(color).build().intent; 75 assertEquals(color, intent.getIntExtra(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, 0));
|
/frameworks/rs/driver/runtime/ |
H A D | rs_convert.c | 66 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 D | posterize.rs | 24 uchar4 color; 31 color = hats; 38 return color;
|
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/ |
H A D | posterize.rs | 24 uchar4 color; 31 color = hats; 38 return color;
|