def color_pixel(index):
    """
    Color the vertex by its index. Note the color index must lie between
    0-255 since gif allows at most 256 colors in the global color table.
    """
    return max(index % 256, 1)