def rgb(red: int, green: int, blue: int, background=False) ->str:
    """Return the ANSI escape that generates the color"""
    if background:
        return '\x1b[48;2;' + str(red) + ';' + str(green) + ';' + str(blue
            ) + 'm'
    else:
        return '\x1b[38;2;' + str(red) + ';' + str(green) + ';' + str(blue
            ) + 'm'
