1. 程式人生 > >js 隨機生成顏色值

js 隨機生成顏色值

function randomColor(){
			let r = Math.floor(Math.random()*256)
			let g = Math.floor(Math.random()*256)
			let b = Math.floor(Math.random()*256)
			return "rgb("+r+','+g+','+b+")"
		}