public function hex2rgb($str_hex, $returnAsString = false, $seperator = ',')
	{
		$str_hex = preg_replace("/[^0-9A-Fa-f]/", '', $str_hex); // Gets a proper hex string
		$rgbArray = array();
		$return = false;
		if (strlen($str_hex) == 6) {
			// If a proper hex code, convert using bitwise operation. No overhead... faster
			$colorVal = hexdec($str_hex);
			$rgbArray = array(
				'red'	=> 0xFF & ($colorVal >> 0x10),
				'green'	=> 0xFF & ($colorVal >> 0x8),
				'blue'	=> 0xFF & $colorVal,
			);
		} elseif (strlen($str_hex) == 3) {
			// if shorthand notation, need some string manipulations
			$rgbArray = array(
				'red'	=> hexdec(str_repeat(substr($str_hex, 0, 1), 2)),
				'green'	=> hexdec(str_repeat(substr($str_hex, 1, 1), 2)),
				'blue'	=> hexdec(str_repeat(substr($str_hex, 2, 1), 2)),
			);
		}
		if (!empty($rgbArray)) {
			$return = $returnAsString
						? implode($seperator, $rgbArray)
						: $rgbArray; // returns the rgb string or the associative array
		}
		return $return;
	}