An eight-digit Android hexadecimal value is called an ARGB. ARGB values are typically expressed using eight hexadecimal digits, with each pair of the hexadecimal digits representing the values of the alpha, red, green and blue channel, respectively. For example, 80FFFF00 represents 50.2% opaque (non-premultiplied) yellow.
The 80 hexadecimal value, which is 128 in decimal, represents a 50.2% alpha value because 128 is approximately 50.2% of the maximum value of 255 (FF hexadecimal); to continue to decipher the 80FFFF00 value, the first FF represents the maximum value red can have; the second FF is like the previous, but for green; the final 00 represents the minimum value blue can have (effectively – no blue).
Consequently red + green yields yellow. In cases where the alpha is not used, this can be shortened to six digits, RRGGBB, and this is why it was chosen to put the alpha in the top bits. Depending on the context, a 0x or a number sign, #, is put before the hexadecimal digits.
Eight-digit hex notation works the same as the six-digit notation, in that you provide a six-digit hexadecimal value, prefixed with a hash (#) symbol.
The difference is, eight-digit notation, as the name suggests, adds two more digits. These two digits represent the alpha channel of the color.
The alpha channel is represented by the last two digits.
This last pair of digits are interpreted as a hexadecimal number (just like the other digits). A value of 00 represents a fully transparent color, and a value of FF represents a fully opaque color.
So for a fully opaque color do this : Color(0xFF<your-6digit-code>)
For example, if you have a 6 digit code: E64526
Now convert it to an 8 digit code with: Color(0xFFE64526)