// 生成hex颜色
function getHexColor(){
let hexColor = []
for(let i = 0; i < 3; i++){
let color = Math.floor(Math.random() * 256).toString(16)
color = color.length === 1 ? '0' + color : color
hexColor.push(color)
}
return '#' + hexColor.join('')
}
生成随机颜色
最新推荐文章于 2023-05-17 11:38:12 发布