# Draws a smooth color gradient from black to white. from DrawingPanel import * RECTS = 32 # constant for number of rectangles def main(): panel = DrawingPanel(256, 256) panel.background = (255, 128, 0) # orange # from black to white, top left to bottom right for i in range(RECTS): c = i * 256 // RECTS panel.fill_rect(c, c, 20, 20, (c, c, c)) main()