All colors, with support for nested colors, convenience methods and full original termcolor compatability.
Project description
more_termcolor
- Pass any number of colors, color-codes, or attributes
- All standard, background, bright, or attribute codes are available (or any combination of them)
- If found, handles existing colors in the
text
arg as to allow the surrounding, adding or combining of colors dynamically and automatically - Convenience methods that expose shortcuts to common values (
bold('foo')
,yellow('bar')
etc) - 100% compatible with the classic
termcolor
lib: anything that works withtermcolor
works the same withmore_termcolor
Example
from more_termcolor import cprint
cprint('some text', 'red', 'on bright black', 'bold', 'italic')
# This is also possible:
from more_termcolor import bold, satred, colored
bold_text = bold('text')
fancy = satred(f'this whole string, including this {bold_text} is bright red')
Roadmap
- Parse complex
color
args, such ascolored('foo', 'bold red on bright blue')
pygments
-like support for pseudo HTML tags, e.g.:colored("<black>some text<on white>that examplifies</on white>what's <b>planned</b></black>")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
more_termcolor-1.0.7.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for more_termcolor-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d000fdb7f0038a43735d7009adf816f218ce206c4b2d6018a52da8ab3b975d8f |
|
MD5 | a267b09863f230702d5c215af934fd66 |
|
BLAKE2b-256 | ffe0e04c5662d1740578ae2b40a3f70d23477a2187b39a86636ea8ee212fe2f1 |