dedqca
Last Updated: September 19, 2018
·
54.88K
· itseranga

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 values

  • In 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

2 Responses
Add your response

29953

hello,
Android uses standard RGB (red, green and blue) color model. Each primary color value is usually represented by hexadecimal number. At the beginning of such a color definition you have to put a pound character (#).

The simplest is just #RGB format, where #000 is black and #FFF is white. But in this format we have only 16 values per color so it gives 4096 combinations. That’s why #RRGGBB format is mainly used. In this format we have 256 values per primary color, so 16 777 216 colors in total. Black is #000000 and white is #FFFFFF.
regards
https://luckypatcher.pro/ https://kodi.software https://plex.software/

4 months ago ·
30546

checkout the latest Appeven on (https://appevendownloads.com/)

20 days ago ·
Awesome Job

Lead Developer
·
Chicago, Cincinnati, Remote
·
Full Time