code: function Color(x, y, z, m) {
        var me, _ref2;
        me = this;
        if (!(x != null) && !(y != null) && !(z != null) && !(m != null)) {
          x = [255, 0, 255];
        }
        if (type(x) === "array" && x.length === 3) {
          if (m == null) m = y;
          _ref2 = x, x = _ref2[0], y = _ref2[1], z = _ref2[2];
        }
        if (type(x) === "string") {
          m = 'hex';
        } else {
          if (m == null) m = 'rgb';
        }
        if (m === 'rgb') {
          me.rgb = [x, y, z];
        } else if (m === 'hsl') {
          me.rgb = Color.hsl2rgb(x, y, z);
        } else if (m === 'hsv') {
          me.rgb = Color.hsv2rgb(x, y, z);
        } else if (m === 'hex') {
          me.rgb = Color.hex2rgb(x);
        } else if (m === 'lab') {
          me.rgb = Color.lab2rgb(x, y, z);
        } else if (m === 'csl') {
          me.rgb = Color.csl2rgb(x, y, z);
        } else if (m === 'hsi') {
          me.rgb = Color.hsi2rgb(x, y, z);
        }
      }
docs: /*
  data type for colors
  
  eg.
  new Color() // white
  new Color(120,.8,.5) // defaults to hsl color
  new Color([120,.8,.5]) // this also works
  new Color(255,100,50,'rgb') //  color using RGB
  new Color('#ff0000') // or hex value