@classmethod
def from_ansi(cls, ansi_string, filter_resets=False):
    """This generated a style from an ansi string. Will ignore resets if filter_resets is True."""
    result = cls()
    res = cls.ANSI_REG.search(ansi_string)
    for group in res.groups():
        sequence = map(int, group.split(';'))
        result.add_ansi(sequence, filter_resets)
    return result
