jblog
toc

Rectangles

2015-03-29, post № 3

programming, Pygame, Python, #background, #code, #color, #generator, #gradient, #rectangles, #wallpaper

Playing around with Pygame I tried to create programs which are pleasant to look at. ‘Rectangles’ generates — as it may sound like — rectangles with different size, color and position. They can appear from the four corners of the screen and have a gradient effect.

Usage

  • ‘s’ to take a screenshot,
  • ‘Space’ generates a new set of rectangles.
rectangles-1.png
rectangles-2.png
rectangles-3.png
Source code: rectangles.py