I am trying to understand how colors work in Android. I have this color set as the background of my LinearLayout
, and I get a background gray with some transparency:
<gradient android:startColor="#b4555555" android:endColor="#b4555555"
android:angle="270.0" />
If I remove the last two characters (55) I get a solid color, losing the transparency. I was trying to find a page where I can see some explanation about this, but I couldn't find it.
Android uses hexadecimal 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 hexadecimal value. Here are the steps:
Alpha Hex Value Process
That's how you find the alpha channel value. I've taken the liberty to put together a list of values for you. Enjoy!
Hex Opacity Values