def with_color(string, fg, bg=49):
    """Given foreground/background ANSI color codes, return a string that,
    when printed, will format the supplied string using the supplied colors.
    """
    return '\x1b[%dm\x1b[%dm%s\x1b[39m\x1b[49m' % (fg, bg, string)
