ARGB colors in android
RGB and ARGB
RGB is a color model. In RGB red, green and blue light are added together in various combinations to reproduce a wide spectrum of colors
RGB(
#RRGGBB
) and ARGB(#AARRGGBB
) values represent as hexadecimal valuesIn RGB you have two digits for every color (red, green, blue), in ARGB you have two additional digits for the alpha channel
Alpha channel represents the transparency value
Android use ARGB hex values to represent colors
More info about android colors http://developer.android.com/guide/topics/resources/more-resources.html#Color
ARGB representation(#AARRGGBB)
AA - Alpha component [0..255] of the color
RR - Red component [0..255] of the color
GG - Green component [0..255] of the color
BB - Blue component [0..255] of the color
Transparency percentages
- Following are some example transparency percentages and their hex values
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
- For an example if you want 50% transparent white color you have to use
#80FFFFFF
color code
Written by eranga bandara
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Colors
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#