728x90
pygame 실행 창 배경색을 설정하는 fill 명령
import pygame
import sys
from pygame.locals import QUIT
pygame.init()
Surface = pygame.display.set_mode((600, 300))
FPSCLOCK = pygame.time.Clock()
pygame.display.set_caption("Test")
def main():
while True:
# 배경색 설정
Surface.fill((50,150,70))
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
FPSCLOCK.tick(30)
if __name__ == '__main__':
main()
'프로그래밍 > Python' 카테고리의 다른 글
[그레이 후드의 MAKE:] 망고플레이트 서비스 종료, 내 데이터 다운받기 (3) | 2023.09.13 |
---|---|
파이썬 RGB 조합으로 새 이미지 만들기 :: Pillow - merge (0) | 2022.12.28 |
Pygame 기본 화면 띄우기 (0) | 2022.12.01 |
파이썬 이미지 채도 조절 :: Pillow - Color (0) | 2020.08.23 |
SciPy 설치 (0) | 2017.08.31 |