Using Color HEX codes in android
This is transparent level codes of hex codes.
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
50% — 80
45% — 73
40% — 66
35% — 59
30% — 4D
25% — 40
20% — 33
15% — 26
10% — 1A
5% — 0D
0% — 00
If you provide 6 hex digits, that means RGB (2 hex digits for each value of red, green and blue).
If you provide 8 hex digits, it's an ARGB (2 hex digits for each value of alpha, red, green and blue respectively).
So actually you're changing from R=B4, G=55, B=55 to A=B5, R=55, G=55, B=55 which is why it's a mostly-transparent grey colour.
http://en.wikipedia.org/wiki/ARGB
http://developer.android.com/guide/topics/resources/more-resources.html#Color
if you want to some transparent level of color using in layout or widgets, just use like that
android:background:"#80FFFFFF"
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
50% — 80
45% — 73
40% — 66
35% — 59
30% — 4D
25% — 40
20% — 33
15% — 26
10% — 1A
5% — 0D
0% — 00
If you provide 6 hex digits, that means RGB (2 hex digits for each value of red, green and blue).
If you provide 8 hex digits, it's an ARGB (2 hex digits for each value of alpha, red, green and blue respectively).
So actually you're changing from R=B4, G=55, B=55 to A=B5, R=55, G=55, B=55 which is why it's a mostly-transparent grey colour.
http://en.wikipedia.org/wiki/ARGB
http://developer.android.com/guide/topics/resources/more-resources.html#Color
if you want to some transparent level of color using in layout or widgets, just use like that
android:background:"#80FFFFFF"
Comments