code: function(r, g, b, a) {
  		var rnum = typeof r === "number";
  		if (rnum
  				&& typeof g === "number"
  				&& typeof b === "number") {
  			//default alpha to one 
  			a = typeof a === "number" ? a : 1.0;
  		} else {
  			r = g = b = a = rnum ? r : 1.0;
  		}
  		
  		if (this.premultiplied) {
  			r *= a;
  			g *= a;
  			b *= a;
  		}
  		
  		this.color = colorToFloat(
  			~~(r * 255),
  			~~(g * 255),
  			~~(b * 255),
  			~~(a * 255)
  		);
  	}
docs: Sets the color of this sprite batcher, which is used in subsequent draw
  calls. This does not flush the batch.
  
  If r, g, b, are all numbers, this method assumes that RGB
  or RGBA float values (0.0 to 1.0) are being passed. Alpha defaults to one
  if undefined.
  
  If one or more of the (r, g, b) arguments are non-numbers, we only consider the first argument
  and assign it to all four components -- this is useful for setting transparency
  in a premultiplied alpha stage.
  
  If the first argument is invalid or not a number,
  the color defaults to (1, 1, 1, 1).
  
  @method  setColor
  @param {Number} r the red component, normalized
  @param {Number} g the green component, normalized
  @param {Number} b the blue component, normalized
  @param {Number} a the alpha component, normalized