Utilizing Streamlit themes
So far, our applications have all had the exact same background and color scheme, apart from the previous section on the color picker. Streamlit allows us to update our applications and change the color of the background and the various components in our app as a customization feature. Using this, we can create Streamlit apps that default to dark mode, or that have the perfect colors for our app, or even create themes that ensure that people affected by color-blindness can see all of our visualizations.
There are two ways to edit the theme of an app – through the UI or through the same config.toml
setup we used in Chapter 3, Data Visualization. When we run our Streamlit apps, in the top-right corner, there is a little hamburger icon. When we click that icon and then click Settings, we will see the following options pop up in the middle of our screen:
Using the preceding menu, we can...