RGB与16进制颜色互转

#rgba-container { }
#rgba-container td { }
#rgba-container table tr:not(:first-child) td:first-child { text-align: right }
#rgba-container input { height: 30px !important; line-height: 30px !important; text-indent: 8px; font-size: 16px; font-weight: bold; color: rgba(54, 54, 54, 1) }
#rgba-rgba-container, #rgba-16x-container { float: left }
#rgba-16x-container { margin-left: 20px }
#rgba-preview { background-color: rgba(255, 255, 255, 1); width: 100px; height: 100px; margin-top: 10px; font-size: 12px; line-height: 170px; text-align: center; overflow: hidden }
#rgba-rgba-container input { width: 60px }
#rgba-16x-container input { width: 150px }
table#rgba-rgba-container { width: 45% }
table#rgba-16x-container { width: 45% }
#named-color-table { border-collapse: separate }
#named-color-table td, #named-color-table th { text-align: left; height: 16px; padding: 0 10px }
#named-color-table tr td:first-child { width: 40px }
#named-color-table tr td:nth-child(0n+2) { font-weight: bold }
#named-color-table tr:hover { background-color: rgba(255, 249, 195, 1) }

说明:RGB中R、G、B三色的取值范围为0~255之间,
透明度A的取值范围为0~255之间,可选
16进制中字符为6或8位

RGB
R(红色):
G (绿色):
B (蓝色):
A (透明度):
16x
字符:
 
预览

版权声明:本文为784040932原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/784040932/p/rgba.html