pygame.init()
screen = pygame.display.set_mode((320, 200))
screen.fill((200, 100, 200))
s = pygame.Surface((64, 64), flags=pygame.SRCALPHA)
for i in range(64):
    pygame.draw.line(s, (0, 0, 0, i * 4), (0, i), (64, i))
screen.blit(s, (50, 30))
pygame.display.flip()
PyGame: translucent sprites with per pixel alpha