how to make a backround color in pygame

Solutions on MaxInterview for how to make a backround color in pygame by the best coders in the world

showing results for - "how to make a backround color in pygame"
Till
26 Mar 2016
1#getting pygame and another library we need for setup
2import pygame, sys
3
4#setup(for starting the pygame i'm pretty sure)
5pygame.init()
6
7#making the screen
8width = 1280
9height = 960
10screen=pygame.display.set_mode((width,height))
11
12#this is the color I want to use. you can change it for a different color using a different tutorial
13backGroundColor=pygame.Color("LIGHTBLUE")
14
15#to make the background always work
16while True:
17  #more setup using the special library which is to not give you an error if you quit the code
18    for event in pygame.event.get():
19        if event.type==pygame.QUIT:
20            pygame.quit()
21            sys.exit
22            break
23#over here you color the screen
24    screen.fill(backGroundColor)
25#setup once again(making it go on i think)
26    pygame.display.flip()
27
28#this code was first not tested and i was curious to see if it worked so i ran the code to find out that it was not working lol and then changed it
29
queries leading to this page
python pygame background colordisplay background color in pygamehow to change my pygame window colourhow to ste colour of background pygamehow to color the background pygamepygame set background colourpygame background colorpygame image background color change background color pygamehow to make background color different in pygamehow to change background color in pygamehow to change the background colour in pygamechange pygame background colorset background color pygamepygame make color for background2 diffrent colors backgorund pygamehow to set bg color in pygamepygame background redhow to put a background color in pygame windowpygame change bg colorchange image background color in pygamehow to use a colour in pygame backgroundhow to set pygame background to a different colorhow to set background color in pygamepygame get a background coloradd background color in pygamehow to change the background color in pygamecolor changing background in pygamechnge color backgrond pygamechange the image background color in pygamepygame window background colorbackground color pygamebackground color in pygamehow to set the background color in pygamehow to make a backround color in pygamehow to change color of title background in pygamepygame set background colorhow to get the current background color in pygamepygame background colour set red background pygamepygame change background colorhow to make a background pygamechange background collor pygamesetting background colour in pygamebackground color pygame documentationpygame change background color of bmp imagehow ot change background color in pygamehow to add background color in pygameset background to color pygamehow to change background color of window pygamehow to make a backround color in pygame