Generar JavaScript de color aleatorio
var randomColor = Math.floor(Math.random()*16777215).toString(16);
Create a snippet
Itchy Ibex
var randomColor = Math.floor(Math.random()*16777215).toString(16);
Create a snippet
function getRandomColor() {
const hue=240 + Math.random() * 260;
return "hsl(" + hue + ", 50%, 60%)";
}