Color Pygame at Color

Color Pygame. This method is used to fill the display with the color specified. You can change it for a different color using a different tutorial.

PyGame transparent Surface [GB] — furas.pl
PyGame transparent Surface [GB] — furas.pl from blog.furas.pl

This is kind of embarrasing but i forgot how to fill a rect object with a certain color. Wabbel is a simple, colorful, annoying tower defense game. It is a wrapper around the sdl (simple directmedia layer) library.

PyGame transparent Surface [GB] — furas.pl

It's probably not recommendable to do this every frame with many surfaces. That's why the black rectangle in the middle disappear. (100,20,30) # now get an object 'rectangle' from the object surface and place it at position x,y r,r.x,r.y = s.get_rect (),x,y screen.blit (s,r) # link the object rectangle to the object surface Pygame uses (red, green, blue) tuples for colors.