from PIL import Image import numpy as np Image.fromarray(np.indices((256, 256)).T.astype(np.uint8)).show()