code: function(r, g, b) {
  
              if (isArray(r)) {
                  return this.rgb2hsv.apply(this, r);
              }
  
              r /= 255;
              g /= 255;
              b /= 255;
  
              var h,s,
                  min = Math.min(Math.min(r,g),b),
                  max = Math.max(Math.max(r,g),b),
                  delta = max-min,
                  hsv;
  
              switch (max) {
                  case min: h=0; break;
                  case r:   h=60*(g-b)/delta; 
                            if (g<b) {
                                h+=360;
                            }
                            break;
                  case g:   h=(60*(b-r)/delta)+120; break;
                  case b:   h=(60*(r-g)/delta)+240; break;
              }
              
              s = (max === 0) ? 0 : 1-(min/max);
  
              hsv = [Math.round(h), s, max];
  
              return hsv;
          }
docs: Converts to RGB [255,255,255] to HSV (h[0-360], s[0-1]), v[0-1]
  @method rgb2hsv
  @param r {int|[int, int, int]} the red value, or an
  array containing all three parameters
  @param g {int} the green value
  @param b {int} the blue value
  @return {[int, float, float]} the value converted to hsv