How to set color_mode to RGBA using script?
To set the color mode to RGBA for the current scene, use:

 bpy.context.scene.render.image_settings.color_mode ='RGBA'


color_mode is a member ImageFormatSettings, which is in turn a member of RenderSettings. The render settings of a scene are accessible via Scene.render.

See here for an explanation how to find out the access path:Blender/Python API Reference Usage: examples of how to use the API reference docs