code: def normalize(color):
      
      if type(color) == tuple:
          color = to_rgba(*color)
      if 'rgba' in color:
          return rgb_to_hex(rgba_to_rgb(color))
      elif 'rgb' in color:
          return rgb_to_hex(color)
      elif '#' in color:
          if len(color) == 7:
              return color
          else:
              color = color[1:]
              return '#' + ''.join([x * 2 for x in list(color)])
      else:
          try:
              return normalize(cnames[color.lower()])
          except:
              raise CufflinksError('Not a valid color: ' + color)
docs: Returns an hex color
  
      Parameters:
      -----------
              color : string
                      Color representation in rgba|rgb|hex
  
      Example:
              normalize('#f03')