def rgbToHex(color):
	""" Converts RGB colour to HEX.
	
	Parameters
	----------
	color : list of str
		color to convert
	
	Returns
	-------
	rgb2hex : str
		The HEX color code as str
	
	"""
	r = int(color[0]*255)
	g = int(color[1]*255)
	b = int(color[2]*255)

	rgb2hex = "#{:02x}{:02x}{:02x}".format(r,g,b)
	
	return rgb2hex