function hexToRgb(hex) {
    	var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
    	return result ? {
       		red: parseInt(result[1], 16),
       		green: parseInt(result[2], 16),
       		blue: parseInt(result[3], 16)
    	} : null;
	}
/**
	*	Converts a hex value to a rgb value in order to be used by resemble
	* @param: hex - the hex value that will be converted
	* @return: the hex value converted to rgb
	*/
Converts a hex value to a rgb value in order to be used by resemble
@param: hex - the hex value that will be converted
@return: the hex value converted to rgb
Converts a hex value to a rgb value in order to be used by resemble @param : hex - the hex value that will be converted @return : the hex value converted to rgb
function hexToRgb(hex) {
    	var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
    	return result ? {
       		red: parseInt(result[1], 16),
       		green: parseInt(result[2], 16),
       		blue: parseInt(result[3], 16)
    	} : null;
	}
function hexToRgb ( hex ) { var result = / ^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$ / i . exec ( hex ) ; return result ? { red : parseInt ( result [ 1 ] , 16 ) , green : parseInt ( result [ 2 ] , 16 ) , blue : parseInt ( result [ 3 ] , 16 ) } : null ; }
Converts a hex value to a rgb value in order to be used by resemble
 @param: hex - the hex value that will be converted
 @return: the hex value converted to rgb
Converts a hex value to a rgb value in order to be used by resemble @param : hex - the hex value that will be converted @return : the hex value converted to rgb