Hex transparency in colors
This question already has an answer here:
Here's a correct table of percentages to hex values. Eg for 50% white you'd use #80FFFFFF.
(source)
The problem can be solved generically by a cross multiplication
How to calculate?
hex values to percentage
percentage = (value in decimal ) / 255 * 100
What is the % transparency of B4 ? B4 in hex is 180.
So 180 / 255 * 100 = 70,5 %
percentage to hex values
decimal = percentage / 100 * 255
What is the hex of 80% ?
80/100*255 = 204 . The hex value of 204 is CC
I prefer to teach how to find the solution rather than handing table
Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime
Color hexadecimal notation is like following: #AARRGGBB
You should first look at how hexadecimal works. You can write at most FF.
链接地址: http://www.djcxy.com/p/15270.html上一篇: 我们如何获得第三名
下一篇: 六角形透明度的颜色