Skip to content

ZaneMuir/Taro-Color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taro-Color

python color print, using ANSI escape code

from TaroColor import TaroColor

usage:

TaroColor.color(msg, foreground = None, background = None, format_str=None):

foreground and background color could use one of {'BLACK', 'RED', 'GREEN', 'YELLOW', 'BLUE', 'MAGENTA', 'CYAN', 'WHITE', 'default, 'BRIGHT_RED', 'BRIGHT_GREEN', 'BRIGHT_YELLOW' , 'BRIGHT_BLUE' , 'BRIGHT_MAGENTA', 'BRIGHT_CYAN'}

format_str: 'b' for bold, 'i' for italic, 'u' for underline

TaroColor.rgb_color(msg, foreground = (r,g,b), background = (r, g, b), format_str=None): r, g, b should be int of 0...255.

TaroColor.xkcd_color(msg, foreground_name=None, background_name=None, format_str=None): foreground_name and background_name shall be str of color names from xkcd

About

python color print

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages