def METHOD_NAME(image, fg, bg, time_ms):
    fg_pen = graphics.create_pen(fg[0], fg[1], fg[2])
    bg_pen = graphics.create_pen(bg[0], bg[1], bg[2])
    graphics.set_pen(bg_pen)
    graphics.clear()
    for y in range(len(image)):
        row = image[y]
        for x in range(len(row)):
            pixel = row[x]
            # draw the prompt text
            if pixel == 'O':
                graphics.set_pen(fg_pen)
            # draw the caret blinking
            elif pixel == 'X' and (time_ms // 300) % 2:
                graphics.set_pen(fg_pen)
            else:
                graphics.set_pen(bg_pen)
            graphics.pixel(x + prompt_x, y + prompt_y)
    su.update(graphics)