List of utility methods to do Color Parse
int | parseColor(String inColor) parse Color int reColor = 0; try { if (inColor != null && inColor.length() != 0) { inColor = inColor.replace(" ", ""); if (inColor.charAt(0) == 'r') { int start = inColor.indexOf('(') + 1; int off = inColor.indexOf(')'); inColor = inColor.substring(start, off); ... |
int | parseColor(String colorName) parse Color return Color.parseColor(colorName.toLowerCase());
|
Integer | parseHexColor(String colorStr) parse Hex Color Integer color = null; try { color = new Integer((int) Long.parseLong(colorStr, 16)); } catch (NumberFormatException e) { return color; |
int | toARGB(String colorString) to ARGB return android.graphics.Color.parseColor(colorString);
|
int | toARGB(int alpha, int red, int green, int blue) to ARGB return android.graphics.Color.argb(alpha, red, green, blue);
|