def fg(color):
    """
    Foreground color formatter function factory.

    Each function casts from a unicode string to a colored bytestring
    with the respective foreground color and foreground reset ANSI
    escape codes. You can also use the ``fg.color`` or ``fg[color]``
    directly as attributes/items.

    The colors are the names of the ``colorama.Fore`` attributes
    (case insensitive). For more information, see:

    https://pypi.python.org/pypi/colorama

    https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
    """
    ansi_code = [getattr(colorama.Fore, color.upper()), colorama.Fore.RESET]
    return lambda msg: msg.join(ansi_code)
def fg ( color ) : ansi_code = [ getattr ( colorama . Fore , color . upper ( ) ) , colorama . Fore . RESET ] return lambda msg : msg . join ( ansi_code )
Foreground color formatter function factory.

    Each function casts from a unicode string to a colored bytestring
    with the respective foreground color and foreground reset ANSI
    escape codes. You can also use the ``fg.color`` or ``fg[color]``
    directly as attributes/items.

    The colors are the names of the ``colorama.Fore`` attributes
    (case insensitive). For more information, see:

    https://pypi.python.org/pypi/colorama

    https://en.wikipedia.org/wiki/ANSI_escape_code#Colors