Lines Matching refs:color

39  * 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) {
70 this(color, color);
74 * Constructs a color set using the given colors for the search orb.
77 * @param color The main search orb color.
80 public Colors(@ColorInt int color, @ColorInt int brightColor) {
81 this(color, brightColor, Color.TRANSPARENT);
85 * Constructs a color set using the given colors.
87 * @param color The main search orb color.
89 * @param iconColor A color used to tint the search orb icon.
91 public Colors(@ColorInt int color, @ColorInt int brightColor, @ColorInt int iconColor) {
92 this.color = color;
93 this.brightColor = brightColor == color ? getBrightColor(color) : brightColor;
98 * The main color of the search orb.
101 public int color;
110 * A color used to tint the search orb icon.
116 * Computes a default brighter version of the given color.
118 public static int getBrightColor(int color) {
120 int red = (int)(Color.red(color) * (1 - sBrightnessAlpha) + brightnessValue);
121 int green = (int)(Color.green(color) * (1 - sBrightnessAlpha) + brightnessValue);
122 int blue = (int)(Color.blue(color) * (1 - sBrightnessAlpha) + brightnessValue);
123 int alpha = (int)(Color.alpha(color) * (1 - sBrightnessAlpha) + brightnessValue);
134 Integer color = (Integer) animator.getAnimatedValue();
135 setOrbViewColor(color.intValue());
193 int defColor = res.getColor(R.color.lb_default_search_color);
194 int color = a.getColor(R.styleable.lbSearchOrbView_searchOrbColor, defColor);
196 R.styleable.lbSearchOrbView_searchOrbBrightColor, color);
198 setOrbColors(new Colors(color, brightColor, iconColor));
283 * Sets the background color of the search orb.
286 * @param color the RGBA color
288 public void setOrbColor(int color) {
289 setOrbColors(new Colors(color, color, Color.TRANSPARENT));
298 public void setOrbColor(@ColorInt int color, @ColorInt int brightColor) {
299 setOrbColors(new Colors(color, brightColor, Color.TRANSPARENT));
303 * Returns the orb color
304 * @return the RGBA color
308 return mColors.color;
319 setOrbViewColor(mColors.color);
333 * Enables or disables the orb color animation.
336 * Orb color animation is handled automatically when the orb is focused/unfocused,
354 mColors.color, mColors.brightColor, mColors.color);
362 private void setOrbViewColor(int color) {
364 ((GradientDrawable) mSearchOrbView.getBackground()).setColor(color);