def truecolor(red, green, blue, background):
    """ Produce an RGB color escape sequence to prepend strings in terminal.

    Thanks to Antti Haapala for this answer to an unrelated question:
    https://stackoverflow.com/a/45782972/7846185
    """
    return f'\x1b[{48 if background else 38};2;{red};{green};{blue}m'
