src/color.js
/*
 * Shade a color towards black by the given amount, 0-1.
 */
Shade a color towards black by the given amount, 0-1.
Shade a color towards black by the given amount 0 - 1 .
function shade(out, color, amount) {
	var i, a = color[3];
	for (i = 0; i < 3; i++) {
		out[i] = color[i] * amount;
	}
	out[3] = a;
}
function shade ( out , color , amount ) { var i , a = color [ 3 ] ; for ( i = 0 ; i < 3 ; i ++ ) { out [ i ] = color [ i ] * amount ; } out [ 3 ] = a ; }
Shade a color towards black by the given amount, 0-1.
Shade a color towards black by the given amount 0 - 1 .