php 函数处理
<?php
//颜色值,透明度值function colorAlpha($color,$alpha){ echo "#".dechex(((100-$alpha)/100)*255).trim($color,"#");}
colorAlpha("#FFFFFF",40);
参考文章:
https://www.jianshu.com/p/161a042da50a