-
- All Implemented Interfaces:
public class ColorHelperHelper class used to do color related operations.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringDEFAULT_COLORprivate final StringDEFAULT_BACKGROUND_COLORpublic final static ColorHelperINSTANCE
-
Method Summary
Modifier and Type Method Description final StringgetOppositeColorString(String color)Compute a color from the contrast of the main access color (to ensure light on dark or dark on light) final IntegerparseColor(String colorString)Parse a color, supporting 3-characters color strings final StringgetDEFAULT_COLOR()final StringgetDEFAULT_BACKGROUND_COLOR()-
-
Method Detail
-
getOppositeColorString
final String getOppositeColorString(String color)
Compute a color from the contrast of the main access color (to ensure light on dark or dark on light)
- Parameters:
color- the base color
-
parseColor
@ColorInt() final Integer parseColor(String colorString)
Parse a color, supporting 3-characters color strings
- Parameters:
colorString- the color hex description, can be 3 or 6 characters
-
getDEFAULT_COLOR
final String getDEFAULT_COLOR()
-
getDEFAULT_BACKGROUND_COLOR
final String getDEFAULT_BACKGROUND_COLOR()
-
-
-
-