from kandinsky import * from random import random coul = (40, 40, 50), (45, 60, 100), (30, 140, 200), (110, 175, 190),\ (160, 190, 160), (200, 140, 0), (190, 110, 2), (40, 30, 15), (40, 30, 15) haut = 0, 80, 140, 180, 190, 195, 207, 207, 222 fill_rect(0, 0, 320, 222, (0, 0, 0)) for i, (c, h) in enumerate(zip(coul, haut)): if i < 8: v = haut[i + 1] - h fill_rect(80, h, 160, v, c) for l in range(v): for c in range(160): if random() < l / v: set_pixel(80 + c, h + l, coul[i + 1])