Ray opaque background
This setting changes how PyMol treats the background. If this option is ON then the background is whatever you specify -- like black or white; however, if the setting is OFF, then the background will be treated as a transparent alpha channel.
Note: turning this setting off creates the transparent backgrounds.
# turn on transparent alpha channel set ray_opaque_background, off