Class ColorHelper
java.lang.Object
com.exxothermic.audioeverywheresdk.helper.logic.ColorHelper
Class used to get colors for the UI on the application
- Since:
- 6/1/14
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
formatColorString
(String mColor) Method that will get a string representing a color, and format it to a Android capable colorstatic String
Method that will get a random color, avoiding both white and black colorsstatic String
Metod that generates a string representing a white colorstatic boolean
isColorValid
(String mBackgroundColor) Method that validate a color string passed as a parameter
-
Constructor Details
-
ColorHelper
public ColorHelper()
-
-
Method Details
-
formatColorString
Method that will get a string representing a color, and format it to a Android capable color- Parameters:
mColor
- the color that will be formated- Returns:
- the string formated as a Android color, if present. Note that no verification for this color is done, callers are responsible to handle color parsing correctly
-
getWhiteColorAsString
Metod that generates a string representing a white color- Returns:
- a string representing the HEX valur cor Color.WHITE;
-
getRandomColor
Method that will get a random color, avoiding both white and black colors- Returns:
- a string representing a random color, on Android format
-
isColorValid
Method that validate a color string passed as a parameter- Parameters:
mBackgroundColor
- a color string that will be validaded- Returns:
- true if this color is valid, false otherwise
-