Petter Envall

〈 Back

Quick random CSS color from JavaScript

Mar 19, 2015
function rndColor() {
	return "hsl("+~~(Math.random()*360)+",80%,60%)";
}

Note: IE8 does not recognize hsl colors.

Click or tap for test: