import crayon import random import url URL_FOLDER = 'http://www.cs.virginia.edu/~cs1112/images/coloring-book/' def color_usa() : ''' Returns a colored in map of the USA ''' random.seed( 'usa' ) link = URL_FOLDER + 'usa.png' im = url.get_coloring_page( link ) crayon.sweep( im ) return im def color_va() : ''' Returns a colored inmap using UVA blue and orange ''' UVA_PURPLE = ( 35, 45, 75 ) UVA_ORANGE = (219, 114, 0 ) random.seed( 'va' ) link = URL_FOLDER + 'usa.png' im = url.get_coloring_page( link, bg=UVA_ORANGE, fg=UVA_PURPLE ) crayon.flood( im, (500, 200), UVA_PURPLE, bg=UVA_ORANGE ) return im if ( __name__ == '__main__' ) : im = color_va() im.show() im = color_usa() im.show()