Open
Description
import pygame
pygame.init()
font = pygame.font.Font(None, 60)
sf = pygame.display.set_mode((640,480))
sf.fill("black")
COLOR_HEX = 0x00ff00ff
COLOR_DEC = (0, 255, 0, 255)
font_sf1 = font.render("test", True, COLOR_HEX)
sf.blit(font_sf1, (10,10))
pygame.draw.rect(sf, COLOR_HEX , (100,10,50,50))
pygame.draw.circle(sf, COLOR_HEX, (200,35), 30)
font_sf2 = font.render("test", True, COLOR_DEC)
sf.blit(font_sf2, (10,100))
pygame.draw.rect(sf, COLOR_DEC , (100,100,50,50))
pygame.draw.circle(sf, COLOR_DEC, (200,125), 30)
pygame.display.flip()
while 1:
pygame.event.get()