Lines Matching refs:color
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) {
41 final int r = Color.red(color);
42 final int g = Color.green(color);
43 final int b = Color.blue(color);
44 color = Color.rgb(r, g, b);
45 ColorFilterCache filters = sColorToFiltersMap.get(color);
48 sColorToFiltersMap.put(color, filters);
56 int color = Color.argb(i, r, g, b);
57 mFilters[i] = new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_ATOP);
65 * @return A ColorFilter at the alpha level for the color represented by the