как заменить это
for x in range(width): for y in range(height): image_pixelaccess[x, y] = next(colors) # colors = iter(list(tuple, tuple, tuple...))
for x in range(width): for y in range(height): image_pixelaccess[x, y] = next(colors) # colors = iter(list(tuple, tuple, tuple...))