1import pygame
2pygame.init() #initialize pygame
3SCREEN_WIDTH = 600 # width (in px)
4SCREEN_HEIGHT = 800 # height (in px)
5
6WIN = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) # creates a screen of 600px X 800px
7RED_VALUE = 255 # should be from 0 - 255
8GREEN_VALUE = 255 # should be from 0 - 255
9BLUE_VALUE = 255 # should be from 0 - 255
10while True:
11 pygame.display.update() # updates the screen
12 WIN.fill(RED_VALUE,GREEN_VALUE,BLUE_VALUE) # this is going to be white in color
1while running:
2 for i in pygame.event.get():
3 if i.type == pygame.QUIT:
4 running = False
5 pygame.quit()
6
7 screen.fill(currentColor) # Fill the screen with whatever the stored color is.
8
9 pygame.display.update() # Refresh the screen, needed whatever the color is, so don't remove this
10