Skip to content

Instantly share code, notes, and snippets.

@Verurteilt
Created March 15, 2016 19:11
Show Gist options
  • Save Verurteilt/6a01510084a79132d1f1 to your computer and use it in GitHub Desktop.
Save Verurteilt/6a01510084a79132d1f1 to your computer and use it in GitHub Desktop.
# encoding: utf-8
class Color(object):
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
def colorear(txt, color=None):
color = not color and Color.FAIL or color
return '%s%s%s' % (color, txt, Color.ENDC)
colorear = staticmethod(colorear)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment