public/rot.js/rot.js
function(color, diff) {
		if (!(diff instanceof Array)) { diff = ROT.RNG.getNormal(0, diff); }
		var result = color.slice();
		for (var i=0;i<3;i++) {
			result[i] += (diff instanceof Array ? Math.round(ROT.RNG.getNormal(0, diff[i])) : diff);
		}
		return result;
	}
function(color, diff) {
		if (!(diff instanceof Array)) { diff = ROT.RNG.getNormal(0, diff); }
		var result = color.slice();
		for (var i=0;i<3;i++) {
			result[i] += (diff instanceof Array ? Math.round(ROT.RNG.getNormal(0, diff[i])) : diff);
		}
		return result;
	}
function ( color , diff ) { if ( ! ( diff instanceof Array ) ) { diff = ROT . RNG . getNormal ( 0 , diff ) ; } var result = color . slice ( ) ; for ( var i = 0 ; i < 3 ; i ++ ) { result [ i ] += ( diff instanceof Array ? Math . round ( ROT . RNG . getNormal ( 0 , diff [ i ] ) ) : diff ) ; } return result ; }
Create a new random color based on this one
@param {number[]} color
@param {number[]} diff Set of standard deviations
@returns {number[]}
Create a new random color based on this one