def METHOD_NAME(theme, index, color=None, title_filter=None):
    """Update coloring filter rule at index, on active theme"""
    tfr = theme.TabFilterRules[index]
    if color:
        tfr.Brush = hex_to_brush(color)
    if title_filter:
        tfr.TitleFilter = Regex(title_filter)