You can use the termcolor module to print colored text to the terminal in Python.
In a jQuery AJAX request, you can output the response HTML data using the .html() method.