public class ColorUtils
extends java.lang.Object
| Constructor and Description |
|---|
ColorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getAccentColor(android.content.Context context)
Returns a color integer associated as accent color from a theme based on a
Context. |
static int |
getPrimaryColor(android.content.Context context)
Returns a color integer associated as primary color from a theme based on a
Context. |
static int |
getPrimaryDarkColor(android.content.Context context)
Returns a color integer associated as primary dark color from a theme based on a
Context. |
static android.content.res.ColorStateList |
getSelector(int color)
Returns a color state list associated with a theme based on a
Context |
static void |
setTintList(android.widget.ImageView imageView,
int tintColor)
Set a color tint list to the
Drawable of an ImageView. |
public static int getPrimaryColor(android.content.Context context)
Context.context - The context used to style the color attributes.public static int getPrimaryDarkColor(android.content.Context context)
Context.context - The context used to style the color attributes.public static int getAccentColor(android.content.Context context)
Context.context - The context used to style the color attributes.public static android.content.res.ColorStateList getSelector(int color)
Contextcolor - The color used for tinting.public static void setTintList(android.widget.ImageView imageView,
int tintColor)
Drawable of an ImageView.imageView - The view to set the default tint list.tintColor - The color to tint.