protected function create_color(&$image, $hex, $alpha)
	{
		extract($this->create_hex_color($hex));

		// Handling alpha is different among drivers
		if ($hex == null)
		{
			$alpha = 127;
		}
		else
		{
			$alpha = 127 - floor($alpha * 1.27);
		}

		// Check if the transparency is allowed
		return imagecolorallocatealpha($image, $red, $green, $blue, $alpha);
	}