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.colors import bold, brightred
bold_text = bold('text')
fancy = brightred(f'this whole string, including this {bold_text} is bright red')
Roadmap
- Parse complex
color
args, such as:
cprint('foo', 'bold red on bright blue')
pygments
-like support for pseudo HTML tags, e.g.:
cprint("<black>some text<on white>that examplifies</on white>what's <bold>planned</bold></black>")
- Custom tags:
cprint("<r>some text</r>", r='red')
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.9.tar.gz
(7.3 kB
view hashes)
Built Distribution
Close
Hashes for more_termcolor-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc5718e9f50746343c68bd0322f6eb61e64dc538e5360e31cf7536e5fab31244 |
|
MD5 | 429f9f8c973721369e71f3810a7e8dfe |
|
BLAKE2b-256 | 30d39e5d4fb255a4add938ef05d93c0bc70fdfec101ce4a3d9c6295ec3b61ff0 |