def _create_ansi_color_dict(color_cls):
    " Create a table that maps the 16 named ansi colors to their Windows code. "
    return {
        'ansidefault':   color_cls.BLACK,
        'ansiblack':     color_cls.BLACK,
        'ansidarkgray':  color_cls.BLACK | color_cls.INTENSITY,
        'ansilightgray': color_cls.GRAY,
        'ansiwhite':     color_cls.GRAY | color_cls.INTENSITY,
        
        # Low intensity.
        'ansidarkred':     color_cls.RED,
        'ansidarkgreen':   color_cls.GREEN,
        'ansibrown':       color_cls.YELLOW,
        'ansidarkblue':    color_cls.BLUE,
        'ansipurple':      color_cls.MAGENTA,
        'ansiteal':        color_cls.CYAN,

        # High intensity.
        'ansired':        color_cls.RED | color_cls.INTENSITY,
        'ansigreen':      color_cls.GREEN | color_cls.INTENSITY,
        'ansiyellow':     color_cls.YELLOW | color_cls.INTENSITY,
        'ansiblue':       color_cls.BLUE | color_cls.INTENSITY,
        'ansifuchsia':    color_cls.MAGENTA | color_cls.INTENSITY,
        'ansiturquoise':  color_cls.CYAN | color_cls.INTENSITY,
    }
def _create_ansi_color_dict ( color_cls ) : return { 'ansidefault' : color_cls . BLACK , 'ansiblack' : color_cls . BLACK , 'ansidarkgray' : color_cls . BLACK | color_cls . INTENSITY , 'ansilightgray' : color_cls . GRAY , 'ansiwhite' : color_cls . GRAY | color_cls . INTENSITY , 'ansidarkred' : color_cls . RED , 'ansidarkgreen' : color_cls . GREEN , 'ansibrown' : color_cls . YELLOW , 'ansidarkblue' : color_cls . BLUE , 'ansipurple' : color_cls . MAGENTA , 'ansiteal' : color_cls . CYAN , 'ansired' : color_cls . RED | color_cls . INTENSITY , 'ansigreen' : color_cls . GREEN | color_cls . INTENSITY , 'ansiyellow' : color_cls . YELLOW | color_cls . INTENSITY , 'ansiblue' : color_cls . BLUE | color_cls . INTENSITY , 'ansifuchsia' : color_cls . MAGENTA | color_cls . INTENSITY , 'ansiturquoise' : color_cls . CYAN | color_cls . INTENSITY , }
Create a table that maps the 16 named ansi colors to their Windows code.