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.1.0.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for more_termcolor-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a7c5e03e8841d068a9d2ecde8c1eb09320ce1f34f5ed8823e3b85cc2810637 |
|
MD5 | 59c5bc606f32de463fb4453469378ee7 |
|
BLAKE2b-256 | 9e07efeb5e93843af17557242a9ca620f7a8bb2eaae4c70b78bd016680859553 |