I wanted to use app inventor colors in one of the my extension. but when I try to convert Integer Color to hex. it is throwing an exception - Unknown color
My code -
String color = "#"+Integer.toHexString(Colour).substring(2);
textView.setLinkTextColor(Color.parseColor(color));
substring's first argument is the start index. The toHexString call will give the ARGB form of the string so substring(2) here skips the first two characters (the alpha channel).
However, @Techno_Vedang, I don't see why you are serializing the color from an int to a string just to parse it back to an int? It should be sufficient to pass the argb color as an int directly to setLinkTextColor. Could you expand more on what you're trying to accomplish with this code?