Skip to content

Daemon0ps/Termcolor-Shorthand-Functions

Repository files navigation

Termcolor Shorthand Functions

Termcolor Cheatsheet Functions. Shorthand functions for printing in color. All printing is done with (,end='') so chr(10) mult be appended or prepended.

tc_shorthand.py

Requires Termcolor - https://github.com/termcolor/termcolor

Termcolor - PyPi - https://pypi.org/project/termcolor/

  pip install termcolor

Download tc_shorthand.py

  wget https://raw.githubusercontent.com/Daemon0ps/Termcolor-Shorthand-Functions/main/tc_shorthand.py
import requests
from io import BytesIO
with requests.Session() as s:
    fb = BytesIO(s.get("https://raw.githubusercontent.com/Daemon0ps/Termcolor-Shorthand-Functions/main/tc_shorthand.py").content)
    with open("e:/tc_shorthand.py", "wb") as fi:
        fi.write(fb.read())

https://raw.githubusercontent.com/Daemon0ps/Termcolor-Shorthand-Functions/main/tc_shorthand.py

from tc_shorthand import *

Extra Files

1. tc_lamnbda_contructor.py This is what I used to parse the former tc_lambda_old.py module that I was using for shorthand Termcolor functions. This was mostly just for fun/practice with various string manipulations / algorithmic logic

2. tc_lambda_old.py The old functions/lambdas

3. ttc_github_readme_constructors.py Script to capture the color/font images, and format the table below.

https://github.com/termcolor/termcolor


Colors:

Example Images were generated in a Windows Powershell Terminal with the Vintage Color Scheme and JetBrains Mono font.

  • _bklf: Black on Black + chr(10)
TC_FUNC COLORS
_bk : black Text
_b : blue Text
_c : cyan Text
_dg : dark_grey Text
_g : green Text
_lb : light_blue Text
_lc : light_cyan Text
_lg : light_green Text
_lgr : light_grey Text
_lm : light_magenta Text
_lr : light_red Text
_ly : light_yellow Text
_m : magenta Text
_r : red Text
_w : white Text
_y : yellow Text
_bk_obk : black Text on black Background
_b_obk : blue Text on black Background
_c_obk : cyan Text on black Background
_dg_obk : dark_grey Text on black Background
_g_obk : green Text on black Background
_lb_obk : light_blue Text on black Background
_lc_obk : light_cyan Text on black Background
_lg_obk : light_green Text on black Background
_lgr_obk : light_grey Text on black Background
_lm_obk : light_magenta Text on black Background
_lr_obk : light_red Text on black Background
_ly_obk : light_yellow Text on black Background
_m_obk : magenta Text on black Background
_r_obk : red Text on black Background
_w_obk : white Text on black Background
_y_obk : yellow Text on black Background
_bk_ob : black Text on blue Background
_b_ob : blue Text on blue Background
_c_ob : cyan Text on blue Background
_dg_ob : dark_grey Text on blue Background
_g_ob : green Text on blue Background
_lb_ob : light_blue Text on blue Background
_lc_ob : light_cyan Text on blue Background
_lg_ob : light_green Text on blue Background
_lgr_ob : light_grey Text on blue Background
_lm_ob : light_magenta Text on blue Background
_lr_ob : light_red Text on blue Background
_ly_ob : light_yellow Text on blue Background
_m_ob : magenta Text on blue Background
_r_ob : red Text on blue Background
_w_ob : white Text on blue Background
_y_ob : yellow Text on blue Background
_bk_oc : black Text on cyan Background
_b_oc : blue Text on cyan Background
_c_oc : cyan Text on cyan Background
_dg_oc : dark_grey Text on cyan Background
_g_oc : green Text on cyan Background
_lb_oc : light_blue Text on cyan Background
_lc_oc : light_cyan Text on cyan Background
_lg_oc : light_green Text on cyan Background
_lgr_oc : light_grey Text on cyan Background
_lm_oc : light_magenta Text on cyan Background
_lr_oc : light_red Text on cyan Background
_ly_oc : light_yellow Text on cyan Background
_m_oc : magenta Text on cyan Background
_r_oc : red Text on cyan Background
_w_oc : white Text on cyan Background
_y_oc : yellow Text on cyan Background
_bk_odg : black Text on dark_grey Background
_b_odg : blue Text on dark_grey Background
_c_odg : cyan Text on dark_grey Background
_dg_odg : dark_grey Text on dark_grey Background
_g_odg : green Text on dark_grey Background
_lb_odg : light_blue Text on dark_grey Background
_lc_odg : light_cyan Text on dark_grey Background
_lg_odg : light_green Text on dark_grey Background
_lgr_odg : light_grey Text on dark_grey Background
_lm_odg : light_magenta Text on dark_grey Background
_lr_odg : light_red Text on dark_grey Background
_ly_odg : light_yellow Text on dark_grey Background
_m_odg : magenta Text on dark_grey Background
_r_odg : red Text on dark_grey Background
_w_odg : white Text on dark_grey Background
_y_odg : yellow Text on dark_grey Background
_bk_og : black Text on green Background
_b_og : blue Text on green Background
_c_og : cyan Text on green Background
_dg_og : dark_grey Text on green Background
_g_og : green Text on green Background
_lb_og : light_blue Text on green Background
_lc_og : light_cyan Text on green Background
_lg_og : light_green Text on green Background
_lgr_og : light_grey Text on green Background
_lm_og : light_magenta Text on green Background
_lr_og : light_red Text on green Background
_ly_og : light_yellow Text on green Background
_m_og : magenta Text on green Background
_r_og : red Text on green Background
_w_og : white Text on green Background
_y_og : yellow Text on green Background
_bk_olb : black Text on light_blue Background
_b_olb : blue Text on light_blue Background
_c_olb : cyan Text on light_blue Background
_dg_olb : dark_grey Text on light_blue Background
_g_olb : green Text on light_blue Background
_lb_olb : light_blue Text on light_blue Background
_lc_olb : light_cyan Text on light_blue Background
_lg_olb : light_green Text on light_blue Background
_lgr_olb : light_grey Text on light_blue Background
_lm_olb : light_magenta Text on light_blue Background
_lr_olb : light_red Text on light_blue Background
_ly_olb : light_yellow Text on light_blue Background
_m_olb : magenta Text on light_blue Background
_r_olb : red Text on light_blue Background
_w_olb : white Text on light_blue Background
_y_olb : yellow Text on light_blue Background
_bk_olc : black Text on light_cyan Background
_b_olc : blue Text on light_cyan Background
_c_olc : cyan Text on light_cyan Background
_dg_olc : dark_grey Text on light_cyan Background
_g_olc : green Text on light_cyan Background
_lb_olc : light_blue Text on light_cyan Background
_lc_olc : light_cyan Text on light_cyan Background
_lg_olc : light_green Text on light_cyan Background
_lgr_olc : light_grey Text on light_cyan Background
_lm_olc : light_magenta Text on light_cyan Background
_lr_olc : light_red Text on light_cyan Background
_ly_olc : light_yellow Text on light_cyan Background
_m_olc : magenta Text on light_cyan Background
_r_olc : red Text on light_cyan Background
_w_olc : white Text on light_cyan Background
_y_olc : yellow Text on light_cyan Background
_bk_olg : black Text on light_green Background
_b_olg : blue Text on light_green Background
_c_olg : cyan Text on light_green Background
_dg_olg : dark_grey Text on light_green Background
_g_olg : green Text on light_green Background
_lb_olg : light_blue Text on light_green Background
_lc_olg : light_cyan Text on light_green Background
_lg_olg : light_green Text on light_green Background
_lgr_olg : light_grey Text on light_green Background
_lm_olg : light_magenta Text on light_green Background
_lr_olg : light_red Text on light_green Background
_ly_olg : light_yellow Text on light_green Background
_m_olg : magenta Text on light_green Background
_r_olg : red Text on light_green Background
_w_olg : white Text on light_green Background
_y_olg : yellow Text on light_green Background
_bk_olgr : black Text on light_grey Background
_b_olgr : blue Text on light_grey Background
_c_olgr : cyan Text on light_grey Background
_dg_olgr : dark_grey Text on light_grey Background
_g_olgr : green Text on light_grey Background
_lb_olgr : light_blue Text on light_grey Background
_lc_olgr : light_cyan Text on light_grey Background
_lg_olgr : light_green Text on light_grey Background
_lgr_olgr : light_grey Text on light_grey Background
_lm_olgr : light_magenta Text on light_grey Background
_lr_olgr : light_red Text on light_grey Background
_ly_olgr : light_yellow Text on light_grey Background
_m_olgr : magenta Text on light_grey Background
_r_olgr : red Text on light_grey Background
_w_olgr : white Text on light_grey Background
_y_olgr : yellow Text on light_grey Background
_bk_olm : black Text on light_magenta Background
_b_olm : blue Text on light_magenta Background
_c_olm : cyan Text on light_magenta Background
_dg_olm : dark_grey Text on light_magenta Background
_g_olm : green Text on light_magenta Background
_lb_olm : light_blue Text on light_magenta Background
_lc_olm : light_cyan Text on light_magenta Background
_lg_olm : light_green Text on light_magenta Background
_lgr_olm : light_grey Text on light_magenta Background
_lm_olm : light_magenta Text on light_magenta Background
_lr_olm : light_red Text on light_magenta Background
_ly_olm : light_yellow Text on light_magenta Background
_m_olm : magenta Text on light_magenta Background
_r_olm : red Text on light_magenta Background
_w_olm : white Text on light_magenta Background
_y_olm : yellow Text on light_magenta Background
_bk_olr : black Text on light_red Background
_b_olr : blue Text on light_red Background
_c_olr : cyan Text on light_red Background
_dg_olr : dark_grey Text on light_red Background
_g_olr : green Text on light_red Background
_lb_olr : light_blue Text on light_red Background
_lc_olr : light_cyan Text on light_red Background
_lg_olr : light_green Text on light_red Background
_lgr_olr : light_grey Text on light_red Background
_lm_olr : light_magenta Text on light_red Background
_lr_olr : light_red Text on light_red Background
_ly_olr : light_yellow Text on light_red Background
_m_olr : magenta Text on light_red Background
_r_olr : red Text on light_red Background
_w_olr : white Text on light_red Background
_y_olr : yellow Text on light_red Background
_bk_oly : black Text on light_yellow Background
_b_oly : blue Text on light_yellow Background
_c_oly : cyan Text on light_yellow Background
_dg_oly : dark_grey Text on light_yellow Background
_g_oly : green Text on light_yellow Background
_lb_oly : light_blue Text on light_yellow Background
_lc_oly : light_cyan Text on light_yellow Background
_lg_oly : light_green Text on light_yellow Background
_lgr_oly : light_grey Text on light_yellow Background
_lm_oly : light_magenta Text on light_yellow Background
_lr_oly : light_red Text on light_yellow Background
_ly_oly : light_yellow Text on light_yellow Background
_m_oly : magenta Text on light_yellow Background
_r_oly : red Text on light_yellow Background
_w_oly : white Text on light_yellow Background
_y_oly : yellow Text on light_yellow Background
_bk_om : black Text on magenta Background
_b_om : blue Text on magenta Background
_c_om : cyan Text on magenta Background
_dg_om : dark_grey Text on magenta Background
_g_om : green Text on magenta Background
_lb_om : light_blue Text on magenta Background
_lc_om : light_cyan Text on magenta Background
_lg_om : light_green Text on magenta Background
_lgr_om : light_grey Text on magenta Background
_lm_om : light_magenta Text on magenta Background
_lr_om : light_red Text on magenta Background
_ly_om : light_yellow Text on magenta Background
_m_om : magenta Text on magenta Background
_r_om : red Text on magenta Background
_w_om : white Text on magenta Background
_y_om : yellow Text on magenta Background
_bk_or : black Text on red Background
_b_or : blue Text on red Background
_c_or : cyan Text on red Background
_dg_or : dark_grey Text on red Background
_g_or : green Text on red Background
_lb_or : light_blue Text on red Background
_lc_or : light_cyan Text on red Background
_lg_or : light_green Text on red Background
_lgr_or : light_grey Text on red Background
_lm_or : light_magenta Text on red Background
_lr_or : light_red Text on red Background
_ly_or : light_yellow Text on red Background
_m_or : magenta Text on red Background
_r_or : red Text on red Background
_w_or : white Text on red Background
_y_or : yellow Text on red Background
_bk_ow : black Text on white Background
_b_ow : blue Text on white Background
_c_ow : cyan Text on white Background
_dg_ow : dark_grey Text on white Background
_g_ow : green Text on white Background
_lb_ow : light_blue Text on white Background
_lc_ow : light_cyan Text on white Background
_lg_ow : light_green Text on white Background
_lgr_ow : light_grey Text on white Background
_lm_ow : light_magenta Text on white Background
_lr_ow : light_red Text on white Background
_ly_ow : light_yellow Text on white Background
_m_ow : magenta Text on white Background
_r_ow : red Text on white Background
_w_ow : white Text on white Background
_y_ow : yellow Text on white Background
_bk_oy : black Text on yellow Background
_b_oy : blue Text on yellow Background
_c_oy : cyan Text on yellow Background
_dg_oy : dark_grey Text on yellow Background
_g_oy : green Text on yellow Background
_lb_oy : light_blue Text on yellow Background
_lc_oy : light_cyan Text on yellow Background
_lg_oy : light_green Text on yellow Background
_lgr_oy : light_grey Text on yellow Background
_lm_oy : light_magenta Text on yellow Background
_lr_oy : light_red Text on yellow Background
_ly_oy : light_yellow Text on yellow Background
_m_oy : magenta Text on yellow Background
_r_oy : red Text on yellow Background
_w_oy : white Text on yellow Background
_y_oy : yellow Text on yellow Background

About

Termcolor Shorthand Functions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages