rgb随机颜色函数

let randcolor = () => {
    let r = 100 + ~~(Math.random() * 100);
    let g = 135 + ~~(Math.random() * 100);
    let b = 100 + ~~(Math.random() * 100);
    return 'rgb(${r}, ${g}, ${b})'
}

  

原文地址:https://www.cnblogs.com/weixiaoxiang/p/13299903.html