lib/conversion.js
function (idx) {
		var r = this.getRed(idx),
			g = this.getGreen(idx),
			b = this.getBlue(idx);

		return Math.floor((Math.max(r, g, b) + Math.min(r, g, b)) / 2);
	}
function (idx) {
		var r = this.getRed(idx),
			g = this.getGreen(idx),
			b = this.getBlue(idx);

		return Math.floor((Math.max(r, g, b) + Math.min(r, g, b)) / 2);
	}
function ( idx ) { var r = this . getRed ( idx ) , g = this . getGreen ( idx ) , b = this . getBlue ( idx ) ; return Math . floor ( ( Math . max ( r , g , b ) + Math . min ( r , g , b ) ) / 2 ) ; }
Gets the lightness of a pixel at a specific index

@method getLightnessAtIndex
@param {int} idx Index of pixel
@return {int} Lightness
Gets the lightness of a pixel at a specific index