I'm getting the above error when I try to run the following code:
int colourInt = Color.parseColor(colour.getHexValue());
The offending hexadecimal value is ee3090b0
. Is there a way I can convert a colour hexdecimal value to its integer equivalent and still retain the alpha value? I've tried following a suggestion made in this post, but it isn't working...
From documentation:
public static int parseColor (String colorString)
Parse the color string, and return the corresponding color-int. If the string cannot be parsed, throws an IllegalArgumentException exception. Supported formats are: #RRGGBB #AARRGGBB 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta', 'yellow', 'lightgray', 'darkgray'
Your method probably returns a string that doesn't start with a #
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With