'''Use Pillow for image representation''' # import the Pillow Image type from PIL import Image # create a d by d canvas on which to paint our image d = 300 # unit depends on your display, and will take up 300 units of screen space, which can vary from dimensions = ( d, d ) # dimensions needs to be an ordered pair in parentheses # colors can be defined by their name ( HTML colors ), RGB ordered pair ( like c3 ), or hex code ( c4 ) c1 = 'Red' c2 = 'Thistle' c3 = (204, 204, 255 ) # darkish gray - RGB values always need to be in the range [ 0, 255 ] c4 = '#0892D0' # electric blue # fun fact about hex - it's base 16, with digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F # hex values - first 2 is red value, second 2 is green, last 2 is blue ( FF in hex is 255 in base 10 ) image0 = Image.new( 'RGB', dimensions ) image1 = Image.new( 'RGB', dimensions, c1 ) image2 = Image.new( 'RGB', dimensions, c2 ) image3 = Image.new( 'RGB', dimensions, c3 ) image4 = Image.new( 'RGB', dimensions, c4 ) image0.show() ; input( 'Enter when ready: ' ) image1.show() ; input( 'Enter when ready: ' ) image2.show() ; input( 'Enter when ready: ' ) image3.show() ; input( 'Enter when ready: ' ) image4.show()