code: function rgbToHsl(r, g, b) {
  
      r = bound01(r, 255);
      g = bound01(g, 255);
      b = bound01(b, 255);
  
      var max = mathMax(r, g, b), min = mathMin(r, g, b);
      var h, s, l = (max + min) / 2;
  
      if(max == min) {
          h = s = 0; // achromatic
      }
      else {
          var d = max - min;
          s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
          switch(max) {
              case r: h = (g - b) / d + (g < b ? 6 : 0); break;
              case g: h = (b - r) / d + 2; break;
              case b: h = (r - g) / d + 4; break;
          }
  
          h /= 6;
      }
  
      return { h: h, s: s, l: l };
  }
docs: `rgbToHsl` Converts an RGB color value to HSL. *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] *Returns:* { h, s, l } in [0,1]