def split_rule(rule):

    """
    Split a rule in color and content.
    """

    color, content = rule.replace(".", "").split("contain")
    color = color.replace("bags", "").replace("bag", "").strip()

    return color, content