Convert Number to HSL - Node.js Number

Node.js examples for Number:Hex

Description

Convert Number to HSL

Demo Code


Number.prototype.intToHSL = function() {
  return "hsl(" + (this % 360) + ", 100%, 30%)";
};

String.prototype.colorize = function() {
  return this.getHashCode().intToHSL();
};

Related Tutorials