def GetColor(percent):
  """Returns an RGB color scale to represent a given percentile."""
  z = int(percent * 512)
  z = 255 - min(255, z)
  hexz = hex(z)[2:]
  if len(hexz) == 1:
    hexz = '0' + hexz
  elif len(hexz) == 0:
    hexz = '00'
  color = '#ff{0}{0}'.format(hexz)
  return color