You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/public/assets/color.813a9497.js

2 lines
305 B

11 months ago
const r=(r,e)=>{var a=r.toLowerCase();if(a&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(a)){if(4===a.length){for(var t="#",s=1;s<4;s+=1)t+=a.slice(s,s+1).concat(a.slice(s,s+1));a=t}var f=[];for(s=1;s<7;s+=2)f.push(parseInt("0x"+a.slice(s,s+2)));return"rgba("+f.join(",")+","+e+")"}return a};export{r as h};