@staticmethod
def _apply_color(code, content):
    """
        Apply a color code to text
        """
    normal = u'\x1b[0m'
    seq = u'\x1b[%sm' % code
    return seq + (normal + seq).join(content.split(normal)) + normal
