Android color opacity transformation by Java, just a little for fun. Android uses Hex ARGB values, which are formatted as #AARRGGBB. That first pair of letters, the AA, represent the Alpha Channel. You must convert your decimal opacity values to a Hexdecimal value. This program determine your AA to percent. Simple , we all can rewrite it , are you interesting to make your part of implemention?
int Color.argb (int alpha, int red, int green, int blue)
alpha Alpha component [0..255] of the color red Red component [0..255] of the color green Green component [0..255] of the color blue Blue component [0..255] of the color