import colorsys


def rgb_to_hs(rgbstr):
  """
  Convert RGB color to (hue, saturation)
  """
  r, g, b = bytes.fromhex(rgbstr[1:])
  h, s, v = colorsys.rgb_to_hsv(r, g, b)

  s2 = 0.5+(255-v)/512

  return {'hue':h, 'saturation':s2}