hueToRgb = (t1, t2, hue) => {
    if (hue < 0) {
      hue += 6;
    }
    if (hue >= 6) {
      hue -= 6;
    }

    if (hue < 1) {
      return (t2 - t1) * hue + t1;
    } else if (hue < 3) {
      return t2;
    } else if (hue < 4) {
      return (t2 - t1) * (4 - hue) + t1;
    } else {
      return t1;
    }
  }
Converts hslx array to rgba array.

The returned alpha component defaults to 1 if it isn't present in the input.

The returned values are not rounded to preserve precision for computations,
so should be rounded before they are used in CSS strings.

@param {?Array<string|number>} hslx The HSL or HSLA elements to convert.
@return {!Array<number>} The RGBA values.