How can I convert hex color to RGB code in Java? Mostly in Google, samples are on how to convert from RGB to hex.
Lots of these solutions work, but this is an alternative.
String hex="#00FF00"; // green long thisCol=Long.decode(hex)+4278190080L; int useColour=(int)thisCol;
If you don't add 4278190080 (#FF000000) the colour has an Alpha of 0 and won't show.