How do I change the theme of a Streamlit app?expand_more
Create or edit .streamlit/config.toml in your project root and add a [theme] section with keys like primaryColor, backgroundColor, secondaryBackgroundColor, and textColor. Use this generator to produce that block automatically — then paste it directly into your config file.
What is primaryColor in Streamlit config.toml?expand_more
primaryColor sets the accent colour used for interactive widgets — sliders, buttons, checkboxes, and the active state of select boxes. It accepts any six-digit hex value, for example primaryColor = "#E8440A". This generator lets you derive it from any brand colour and preview it live.
Can I use a custom colour palette in Plotly charts inside Streamlit?expand_more
Yes. Pass a list of hex values to the color_discrete_sequence parameter on any Plotly Express call, or set px.defaults.color_discrete_sequence globally at the top of your script. This generator exports a ready-to-use PLOTLY_COLORS list that stays in harmony with your Streamlit theme.
Does Streamlit support dark mode?expand_more
Yes. Set backgroundColor = "#0e1117" and secondaryBackgroundColor = "#1a1c23" in the [theme] block of config.toml. This generator has a built-in dark mode toggle that automatically adjusts all exported values — config.toml, Plotly, Matplotlib, and Altair — to match.