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
bold_text = bold('text')
fancy = satred(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.8.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for more_termcolor-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30077153f16449078c2c0c2da2b25c6b022e7b1880613f76104f59a1685cec22 |
|
MD5 | d6c0f359ac53656174714c747ab41133 |
|
BLAKE2b-256 | d83c37fd4bc775056cc2e44565928470fdd1b42e406dca415d9e248d942710e1 |