generate random color javascript
var randomColor = Math.floor(Math.random()*16777215).toString(16); Create a snippet
Source: css-tricks.com
get random hsl color js
function getRandomColor() { const hue=240 + Math.random() * 260; return "hsl(" + hue + ", 50%, 60%)"; }