https://stackoverflow.com/a/13078080/3157252 -- Not mine, foudnd it
There's per-pixel alpha, colorkey alpha, and per-surface alpha. You're asking for colorkey.
When you call convert_alpha()
it creates a new surface for per-pixel alpha.
And from set_colorkey
The colorkey will be ignored if the Surface is formatted to use per pixel alpha values.
So: Load image with .convert()
Since you want to use a color key. Then call set_colorkey
.
Also, I saw nothing in the docs about passing "-1" as first argument to set_colorkey.
That's probably from a tutorial, which has a load_image function to grab the topleft pixel's color value.