def hilite(string, color=0):
  color_code = COLOR_CODES[COLORS[color]]
  out_str = "\x1b[{color_code}m{string}\x1b[0m".format(color_code=color_code, string=string)
  return out_str
hilite a string in TTY terminals/shells
dataset/ETHPy150Open robmoggach/python-moshion/moshion/util.py/hilite