0

Okay guys, I'm trying to fade out an image. So given this:

img_ = pygame.image.load('circle.png')
screen.blit(img_, [100, 100])

how can I change the opacity of img_? Thanks!

1 Answers1

0

Pygame surfaces have a method named set_alpha() for this, which takes a value between 0 and 255.

Relevant docs: https://www.pygame.org/docs/ref/surface.html#pygame.Surface.set_alpha

Starbuck5
  • 1,649
  • 2
  • 7
  • 13