Hex Colors in Android are some times 8 digits. How? What is the difference between #FFFFFF and #FFFFFF00 Hex Colors in Android are some times 8 digits. How? What is the difference between #FFFFFF and #FFFFFF00 android android

Hex Colors in Android are some times 8 digits. How? What is the difference between #FFFFFF and #FFFFFF00


The extra 2 digits are used to define the colors transparency, or alpha channel.

Android uses the ARGB format (or AARRGGBB as you use in your example)

For more (Android-specific) information take a look at the Color documentation


The first two characters are representing the alpha (transparency) value, where FF is fully visible. This is known as aRGB.


8-digit hex is an ARGB color. It is the same as usual RGB, but provides an extra alpha channel.

#RRGGBB in RGB is the same as #00RRGGBB in ARGB. Also take a look at Color.argb.