Hello,
i deployed ma streamlit app on cloud with github but when i try to change theme (like backgroundcolor) with my file .streamlit/config.toml it doesn’t work.
I was looking for a solution but didn’t find an answer that works.
I let my code below.
My file .streamlit/config.toml:
[theme]
backgroundColor="#fffffe"
secondaryBackgroundColor="#fddc70"
My code in main_page.py
# Charger les configurations de thème à partir du fichier config.toml
config_data = toml.load(".streamlit/config.toml")
# # Appliquer les configurations de thème
theme_config = config_data.get("theme", {})
try:
st.set_page_config(
page_title="projet RPG - Eric Lachard",
page_icon=":memo:",
layout="centered",
initial_sidebar_state="expanded",
**theme_config
)
except Exception as e:
st.markdown(f"Erreur: {e}")
I precise ce error message is about theme option’s name doesn’t fit with set_page_config.
Thank you