function reColorHexadecimal( mode ) {
	if ( arguments.length > 0 ) {
		if ( !isMode( mode ) ) {
			throw new Error( format( 'invalid argument. Mode must be one of the following: "%s". Value: `%s`.', MODES.join( '", "' ), mode ) );
		}
	}
	if ( mode === 'shorthand' ) {
		return /^[0-9A-F]{3}$/i;
	}
	if ( mode === 'either' ) {
		return /^[0-9A-F]{3}$|^[0-9A-F]{6}$/i;
	}
	// Case: mode === 'full'
	return /^[0-9A-F]{6}$/i;
}
Returns a regular expression to match a hexadecimal color.

@param {string} [mode='full'] - color format (`full`, `shorthand`, or `either`)
@throws {Error} mode must be `full`, `shorthand`, or `either`
@returns {RegExp} regular expression

@example
var RE = reColorHexadecimal();
// returns <RegExp>

var bool = RE.test( 'ffffff' );
// returns true

bool = RE.test( '000' );
// returns false