https://packages.python.org/sphinxcontrib-ansi
A Sphinx extension, which turns ANSI color sequences in Sphinx documents into colored HTML output.
This extension can be installed from the Python Package Index:
pip install sphinxcontrib-ansi
Alternatively, you can clone the sphinx-contrib/ansi repository, and install the extension directly from the repository:
git clone https://github.com/sphinx-contrib/ansi sphinxcontrib-ansi cd sphinxcontrib-ansi python setup.py install
Please refer to the documentation for further information.