Random light color - Node.js CSS

Node.js examples for CSS:Color

Description

Random light color

Demo Code

function ranColor() {
  var hexTab = "5555556789ABCDEF";  //  light random colors
  var r = hexTab[ Math.floor( Math.random() * 16) ];
  var g = hexTab[ Math.floor( Math.random() * 16) ];
  var b = hexTab[ Math.floor( Math.random() * 16) ];
  return "#" + r + g + b;
}

Related Tutorials