docs: def color_to_rgb(color):
      """\
      Converts web color names like "red" or hexadecimal values like "#36c",
      "#FFFFFF" and RGB tuples like ``(255, 255 255)`` into a (R, G, B) tuple.
  
      :param color: A web color name (i.e. ``darkblue``) or a hexadecimal value
              (``#RGB`` or ``#RRGGBB``) or a RGB tuple (i.e. ``(R, G, B)``))
      :return: ``(R, G, B)`` tuple.
      """
      rgb = color_to_rgb_or_rgba(color)
      if len(rgb) != 3:
          raise ValueError('The alpha channel {0} in color "{1}" cannot be '
                           'converted to RGB'.format(rgb[3], color))
      return rgb