Skip to main content

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 with termcolor works the same with more_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)

Uploaded Source

Built Distribution

more_termcolor-1.1.0-py3-none-any.whl (9.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page