docs: def _hex_to_rgb(color):
      """\
      Helper function to convert a color provided in hexadecimal format
      as RGB triple.
      """
      if color[0] == '#':
          color = color[1:]
      if len(color) == 3:
          color = color[0] * 2 + color[1] * 2 + color[2] * 2
      if len(color) != 6:
          raise ValueError('Input #{0} is not in #RRGGBB format'.format(color))
      return [int(n, 16) for n in (color[:2], color[2:4], color[4:])]