Replace the existing line with the given colored string.

def update_color(string, name, style='normal', when='auto'):
    """ Replace the existing line with the given colored string. """
    clear()
    write_color(string, name, style, when)