def METHOD_NAME(cls, token):
    t = cls._styles[token]
    ansicolor = bgansicolor = None
    color = t[0]
    if color in _deprecated_ansicolors:
        color = _deprecated_ansicolors[color]
    if color in ansicolors:
        ansicolor = color
        color = _ansimap[color]
    bgcolor = t[4]
    if bgcolor in _deprecated_ansicolors:
        bgcolor = _deprecated_ansicolors[bgcolor]
    if bgcolor in ansicolors:
        bgansicolor = bgcolor
        bgcolor = _ansimap[bgcolor]
    return {
        'color':        color or None,
        'bold':         bool(t[1]),
        'italic':       bool(t[2]),
        'underline':    bool(t[3]),
        'bgcolor':      bgcolor or None,
        'border':       t[5] or None,
        'roman':        bool(t[6]) or None,
        'sans':         bool(t[7]) or None,
        'mono':         bool(t[8]) or None,
        'ansicolor':    ansicolor,
        'bgansicolor':  bgansicolor,
    }