import time import pygame import pygame.font from pygame.locals import * pygame.init() window = pygame.display.set_mode((500, 200), 0, 32) font = pygame.font.SysFont("Vera.ttf", 40) testsurf = font.render("testing alpha blending", True, (250, 0, 0, 25)) # has no effect # testsurf = testsurf.convert_alpha() # with an alpha of 0 why do we see this?? #window.fill((0,250,0,0)) y = testsurf.get_height()/2 for x in range(testsurf.get_width()): c = testsurf.get_at((x, y)) testsurf.set_at((x, y), (c[0],c[1],c[2],50)) print "window's alpha (not per pixel) is ", window.get_alpha() window.blit(testsurf, (20, 20)) # sometimes have to do this twice? double buffering? pygame.display.flip() pygame.display.flip() time.sleep(5)