code: function (x, y, z, s) { // !!! this function takes x,y,z not h,s,v
      var r = 0,
        g = 0,
        b = 0,
        c = 0,
        d = (100 - y / 2.55) / 100,
        i = z / 255,
        j = z * (255 - y) / 255;
  
      if (x < 42.5) {
        r = z;
        g = x * 6 * i;
        g += (z - g) * d;
        b = j
      } else if (x >= 42.5 && x < 85) {
        c = 42.5;
        r = (255 - (x - c) * 6) * i;
        r += (z - r) * d;
        g = z;
        b = j
      } else if (x >= 85 && x < 127.5) {
        c = 85;
        r = j;
        g = z;
        b = (x - c) * 6 * i;
        b += (z - b) * d
      } else if (x >= 127.5 && x < 170) {
        c = 127.5;
        r = j;
        g = (255 - (x - c) * 6) * i;
        g += (z - g) * d;
        b = z
      } else if (x >= 170 && x < 212.5) {
        c = 170;
        r = (x - c) * 6 * i;
        r += (z - r) * d;
        g = j;
        b = z
      } else if (x >= 212.5) {
        c = 212.5;
        r = z;
        g = j;
        b = (255 - (x - c) * 6) * i;
        b += (z - b) * d
      }
      if (s) return [r, g, b];
      else return [Math.round(r), Math.round(g), Math.round(b)];
    }
docs: attribute definitions