text: /**
   * Converts an HSL color value to RGB. Conversion formula
   * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
   * Assumes h, s, and l are contained in the set [0, 1] and
   * returns r, g, and b in the set [0, 1].
   *
   * @param   Number  h       The hue
   * @param   Number  s       The saturation
   * @param   Number  l       The lightness
   * @return  Array           The RGB representation
   */
  export const hslToRgb = ([hue, saturation, lightness]) => {
    if (saturation === 0) {
      // Achromatic
      return [lightness, lightness, lightness];
    } else {
      // Chromatic
      let q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
      let p = 2 * lightness - q;
      return [hue2rgb(p, q, hue + 1 / 3),
              hue2rgb(p, q, hue),
              hue2rgb(p, q, hue - 1 / 3)];
    }
  };
  
  // FIX: Make readable.
  function hue2rgb (p, q, t) {
    if (t < 0) t += 1;
    if (t > 1) t -= 1;
    if (t < 1 / 6) return p + (q - p) * 6 * t;
    if (t < 1 / 2) return q;
    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
    return p;
  }
  