The color white, as far as I know is defined as
#ffffff
but android defines it this way
#ffffffff
why the 2 extra f?
Thanks
Colour codes are usually defined in either 3, 6, or 8 characters.
#FFFFFF
means that it is in RGB format. However, you can also have
#FFFFFFFF
is in ARGB format, which means that the first two characters represent the alpha value. In other words, the first two characters represent the opacity.
Have a look at this answer for a Java method to calculate the alpha values.
The first two places define the transparency/opacity of the color.
Here's a correct table of percentages to hex values. Eg for 50% white you'd use #80FFFFFF.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.