All standard, background, bright, or attribute codes are available (or any combination of them)
Intelligently handles existing colors in the text
as to allow adding or combining colors automatically, while ensuring the smallest string size possible
100% compatible with the classic termcolor
lib: anything that works with termcolor
works the same with more_termcolor
# This is also possible:
from more_termcolor.colors import bold, brightgreen
bold_text = bold('text')
fancy = brightgreen(f'this whole string, including this {bold_text} is bright green')
>>>
this whole string, including this text is bright red
cprint('foo', 'bold bright blue on black')
>>>
foo
text = "<magenta>some text<on yellow>that shows</on yellow>what's <bold ul>planned</bold ul></magenta>"
cprint(text)
>>>
some text
that shows
what's
planned
text = "<m>some text<oy>that shows</oy>what's <bu>planned</bu></m>"
cprint(text, m='magenta', oy='on yellow', bu='bold ul')
>>>
some text
that shows
what's
planned
stuff = {'food': 'pizza', 'love': 'wife'}
cprint(stuff, bold=r"'\w+':")
>>> {'food': 'pizza', 'love': 'wife'}