How to set the background color of st.sidebar

It should be something like this, where you can put any color you’d like in the linear-gradient argument:

st.markdown(
    """
<style>
.sidebar .sidebar-content {
    background-image: linear-gradient(#2e7bcf,#2e7bcf);
    color: white;
}
</style>
""",
    unsafe_allow_html=True,
)
2 Likes