It would be useful to be able to specify bold text without specifying a color (so the default foreground color will be used which will be compatible with the current terminal color scheme). A quick version based on how clint does colors:
def default_color(s, always=False, bold=False):
if bold and (always or sys.stdout.isatty()):
return '{on}{string}{off}'.format(
on=getattr(colorama.Style, 'BRIGHT'),
string=s,
off=getattr(colorama.Style, 'NORMAL'))
else:
return s
It would be useful to be able to specify bold text without specifying a color (so the default foreground color will be used which will be compatible with the current terminal color scheme). A quick version based on how clint does colors: