def render_bar(screen, origin, width, height, color):
    """
    Fills a rectangle within *screen* based at *origin* (an ``(x, y)`` tuple),
    *width* pixels wide and *height* pixels high. The rectangle will be filled
    in *color*.
    """
    x1, y1 = origin
    x2 = x1 + width
    y2 = y1 + height
    max_y, max_x = screen.shape[:2]
    y1, y2 = max_y - y2, max_y - y1
    screen[y1:y2, x1:x2, :] = color
