def hex_to_rgb(h):
    """Converts a "#rrbbgg" string to a (red, green, blue) tuple.

    Args:
        h: a hex string

    Returns:
        an R, G, B tuple
    """
    h = h.lstrip("#")
    return tuple(int(h[i : i + 2], 16) for i in (0, 2, 4))