def warning(s): short, rgb = colorhelper.rgb2short('d78700') sys.stdout.write('\033[38;5;%smWarning: \033[0m%s\n' % (short, s))
#! /usr/bin/env python import colorhelper import sys if __name__ == '__main__': short, rgb = colorhelper.rgb2short(sys.argv[1]) code = '\\[\\033[38;5;%sm\\]' % (short) sys.stdout.write(code)
def error(s): short, rgb = colorhelper.rgb2short('FF0000') sys.stdout.write('\033[38;5;%smError: \033[0m%s\n' % (short, s))