# Customizing Streamlit Theme from the Command Line

**URL:** <https://discuss.streamlit.io/t/customizing-streamlit-theme-from-the-command-line/44945>\
**Category:** Show the Community!\
**Created:** [June 9, 2023, 2:11pm UTC](https://discuss.streamlit.io/t/customizing-streamlit-theme-from-the-command-line/44945 "2023-06-09T14:11:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dallas](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@Dallas](https://discuss.streamlit.io/u/Dallas)\
**Post date:** [June 9, 2023, 2:11pm UTC](https://discuss.streamlit.io/t/customizing-streamlit-theme-from-the-command-line/44945/1 "2023-06-09T14:11:03Z")

</div>

### Summary

I recently discovered how to select custom theme colors for your Streamlit application without modifying the config.toml file and I wanted to share with the group.

When starting your Streamlit application from the command line, you can specify the following theme related flags:

```auto
>streamlit run my_app.py --theme.base="light" --theme.primaryColor="#0066CC" --theme.backgroundColor="#FFFFFF" --theme.secondaryBackgroundColor="#F0F2F6" --theme.textColor="#262730" --theme.font="sans serif"

```

In addition, to change the color of the gradient bar at the top of your page, you can add the following code into your python application:

```auto
st.markdown("""
<style>
	[data-testid="stDecoration"] {
		background-image: linear-gradient(90deg, rgb(0, 102, 204), rgb(102, 255, 255));
	}
</style>""",
unsafe_allow_html=True)

```

I hope someone finds this helpful

---

<div class="post-metadata">

**Author:** ![dataprofessor](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/dataprofessor/32/44163_2.png) [@dataprofessor](https://discuss.streamlit.io/u/dataprofessor)\
**Post date:** [June 25, 2023, 12:46pm UTC](https://discuss.streamlit.io/t/customizing-streamlit-theme-from-the-command-line/44945/2 "2023-06-25T12:46:03Z")

</div>

Thanks @Dallas for sharing this with the community an awesome CSS customization.

Inspired from this solution, I’ve also done a small tweak for changing the color of the top white bar:

```python
[data-testid="stHeader"] {
		background-image: linear-gradient(90deg, rgb(0, 102, 204), rgb(102, 255, 255));
	}

```

 ![Screenshot 2566-06-25 at 19.45.26](https://global.discourse-cdn.com/streamlit/original/3X/c/c/cc202c7857ddc4cd8c5328af5ded40cd1e1bd478.jpeg)

Best regards,  
Chanin

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [December 22, 2023, 12:46pm UTC](https://discuss.streamlit.io/t/customizing-streamlit-theme-from-the-command-line/44945/3 "2023-12-22T12:46:57Z")

</div>

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