def colored_pygments_excepthook(type_, value, tb):
    """
    References:
        https://stackoverflow.com/questions/14775916/color-exceptions-python

    CommandLine:
        python -m utool.util_inject --test-colored_pygments_excepthook

    """
    tbtext = ''.join(traceback.format_exception(type_, value, tb))
    try:
        from utool import util_str
        formatted_text = util_str.highlight_text(tbtext, lexer_name='pytb',
                                                 stripall=True)
    except Exception:
        # FIXME silent errro
        formatted_text = tbtext
        return sys.__excepthook__(type_, value, tb)
        #import utool as ut
        #if ut.SUPER_STRICT:
        #    raise
    sys.stderr.write(formatted_text)
References:
        https://stackoverflow.com/questions/14775916/color-exceptions-python

    CommandLine:
        python -m utool.util_inject --test-colored_pygments_excepthook