def METHOD_NAME(m):
    bg = bold = ''
    if m.group('fg_bold'):
        bold = '{b}'
    if bg_color := m.group('bg'):
        bg = '{bg%s}' % bg_color.replace('grey', 'white')
    fg = '{%s}' % m.group('fg').replace('grey', 'white')
    return Color(f'{bold}{bg}{fg}')