import image import sys sys.argv = ['_', '100'] def red_color_spectrum(red): """Returns a 256 by 256 image matrix with pixels representing all possible 24-bit rgb colors (8 bits each for r, g, and b) with the indicated amount of red (0 to 255). """ matrix = [] for y in range(256): row = [] for x in range(256): pixel = (red, x, y) row.append(pixel) matrix.append(row) return matrix def main(): red = int(sys.argv[1]) m = red_color_spectrum(red) im = image.new(m) im.show() if __name__ == '__main__': main()