‘Colors V’ is the fifth version of my ‘Colors’ program. The four prior versions I just did not publish. This fifth version is nice and cleaned up, using easy to manipulate code and user input.
It is designed to create gradients. Going through the screen, column by column, it calculates for every pixel a color (see first function in the code). By this method it sometimes creates beautiful, sometimes more – I would say ‘interesting’ – images. The image I show here is a very basic gradient (there are way more interesting results).
- ‘s’ to take a screenshot
- Space to recreate (or start) the image creation
# Python 2.7.7 Code # Pygame 1.9.1 (for Python 2.7.7) # Jonathan Frech 23rd of March, 2015 # edited 2nd of April, 2015
This part of the code defines the image (if I post other results, I will just update this part of the code and referr to the rest).
# creates pixel (used in array manipulation) def getPixel(x, y, X, Y): return ( colorValid( x ), colorValid( y ), colorValid( 0 ) )