How to set the background color of st.sidebar

You can easily change the sidebar color via theming nowadays. Just add the following text to your config file (in .streamlit/config.toml) to e.g. make the sidebar orange:

[theme]
secondaryBackgroundColor="#FFA421"

There are also more options, see our theming docs