Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python style console output

class colors:
    '''Colors class:
    reset all colors with colors.reset
    two subclasses fg for foreground and bg for background.
    use as colors.subclass.colorname.
    i.e. colors.fg.red or colors.bg.green
    also, the generic bold, disable, underline, reverse, strikethrough,
    and invisible work with the main class
    i.e. colors.bold
    '''
    reset='33[0m'
    bold='33[01m'
    disable='33[02m'
    underline='33[04m'
    reverse='33[07m'
    strikethrough='33[09m'
    invisible='33[08m'
    class fg:
        black='33[30m'
        red='33[31m'
        green='33[32m'
        orange='33[33m'
        blue='33[34m'
        purple='33[35m'
        cyan='33[36m'
        lightgrey='33[37m'
        darkgrey='33[90m'
        lightred='33[91m'
        lightgreen='33[92m'
        yellow='33[93m'
        lightblue='33[94m'
        pink='33[95m'
        lightcyan='33[96m'
    class bg:
        black='33[40m'
        red='33[41m'
        green='33[42m'
        orange='33[43m'
        blue='33[44m'
        purple='33[45m'
        cyan='33[46m'
        lightgrey='33[47m'
Comment

python style console output

class bcolors:
    HEADER = '33[95m'
    OKBLUE = '33[94m'
    OKCYAN = '33[96m'
    OKGREEN = '33[92m'
    WARNING = '33[93m'
    FAIL = '33[91m'
    ENDC = '33[0m'
    BOLD = '33[1m'
    UNDERLINE = '33[4m'
Comment

python style console output

CEND      = '33[0m'
CBOLD     = '33[1m'
CITALIC   = '33[3m'
CURL      = '33[4m'
CBLINK    = '33[5m'
CBLINK2   = '33[6m'
CSELECTED = '33[7m'

CBLACK  = '33[30m'
CRED    = '33[31m'
CGREEN  = '33[32m'
CYELLOW = '33[33m'
CBLUE   = '33[34m'
CVIOLET = '33[35m'
CBEIGE  = '33[36m'
CWHITE  = '33[37m'

CBLACKBG  = '33[40m'
CREDBG    = '33[41m'
CGREENBG  = '33[42m'
CYELLOWBG = '33[43m'
CBLUEBG   = '33[44m'
CVIOLETBG = '33[45m'
CBEIGEBG  = '33[46m'
CWHITEBG  = '33[47m'

CGREY    = '33[90m'
CRED2    = '33[91m'
CGREEN2  = '33[92m'
CYELLOW2 = '33[93m'
CBLUE2   = '33[94m'
CVIOLET2 = '33[95m'
CBEIGE2  = '33[96m'
CWHITE2  = '33[97m'

CGREYBG    = '33[100m'
CREDBG2    = '33[101m'
CGREENBG2  = '33[102m'
CYELLOWBG2 = '33[103m'
CBLUEBG2   = '33[104m'
CVIOLETBG2 = '33[105m'
CBEIGEBG2  = '33[106m'
CWHITEBG2  = '33[107m'
Comment

PREVIOUS NEXT
Code Example
Python :: list of df to df 
Python :: plt.xticks 
Python :: does np.random.randint have a seed 
Python :: flask redirect to url 
Python :: python gzip file 
Python :: pandas append index ignore 
Python :: primary key django model 
Python :: how to remove blank lines from string in python 
Python :: python class name 
Python :: create a role with discord.py 
Python :: exec to return a value python 
Python :: 2d array python3 
Python :: generic python 
Python :: how to remove arrays in python from a specific place 
Python :: python bash command 
Python :: python json open file 
Python :: python empty dictionary 
Python :: python float precision 
Python :: python filter list of strings 
Python :: python convert list of strings to list of integers 
Python :: python3 yyyymmddhhmmss 
Python :: pandas remove column 
Python :: IntegrityError import in django 
Python :: python get address of object 
Python :: python kill process by name 
Python :: python ddos 
Python :: python print utf-8 
Python :: python hello world program 
Python :: how to check python version on terminal 
Python :: python remove all unicode from string 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =