I\'m getting the above error when I try to run the following code:
int colourInt = Color.parseColor(colour.getHexValue());
The offending he
I want to add something with the accepted answer. I had similar exception while I'm trying to use black color using Color.parseColor("#000") which start with #.So the thing is inside your parseColor method it only accept a six digit hex code of color,If it is less or greater than this its give the exception.I change it like #121212(black) this and it works for me.