获取随机rgba色值
RandomColor (index) {
let r, g, b
r = Math.floor(Math.random() * 256)
g = Math.floor(Math.random() * 256)
b = Math.floor(Math.random() * 256)
a = 0.5
return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'
}
获取随机rab色值
RandomColor (index) {
let r, g, b
r = Math.floor(Math.random() * 256)
g = Math.floor(Math.random() * 256)
b = Math.floor(Math.random() * 256)
return 'rgba(' + r + ',' + g + ',' + b + ')'
}