How to change the color of the st.download button

Hi there,

I’d love to know if there’s a way to change the color of the download button.

def download_image(x):
    column1, column2, column3 = st.columns((3, 2, 2))
    with column2:
        with open(x, "rb") as file:
                        btn = st.download_button(
                                label="Download image",
                                data=file,
                                file_name=x,
                                mime="image/jpg"
                            )

Hi @Myneed_Personal,

Thanks for posting!

You can do this via theming or adding some CSS via st.markdown. Check out this thread which covers questions.

Caroline :balloon:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.