function interpolateHSL(color1, color2, factor) {
    if (factor === void 0) {
      factor = 0.5;
    }
    var hsl1 = rgb2hsl(color1);
    var hsl2 = rgb2hsl(color2);
    for (var i = 0; i < 3; i++) {
      hsl1[i] += factor * (hsl2[i] - hsl1[i]);
    }
    return hsl2rgb(hsl1);
  }
Interpolate (blend) two colors with a given factor in HSL mode