hello.js 198 B

123456
  1. function randomColor(opacity=1) {
  2. let r = parseInt(Math.random() * 256)
  3. let g = parseInt(Math.random() * 256)
  4. let b = parseInt(Math.random() * 256)
  5. return `rgba(${r}, ${g}, ${b}, ${opacity})`
  6. }