Background and text colors

I bow to your awesomness creating this tool. Presentation to my team later this week. QQ: is it possible to set the page background color (to black) and the text color (to white). Out team logo is on a black backgpound.

Thanks!

Welcome to the Streamlit community and thank you for the kind words :smiley:

We’ve had that come up a few times recently, and we’re considering different ways to support it. We want to make theming super easy, so the exact API may take a little time to land. Here’s a feature request you can follow/upvote/comment on!

In the meantime, some users have been hacking this together by passing a <style> block into st.markdown with unsafe_allow_html=True. The problem with this is you’ll have to update a lot of styles to get things to look the way you want it :cry: .

Hope this helps and good luck on the presentation, we’d love to hear how it goes!

Give us the whole code

Hi @Tshokelo_Mokubi,

You’ll find an example of background color here and text color formatting here.

Best
Fanilo

Text color formatting is as simple as the following (using ‘red’ as an example):

<*font color=‘red’>THIS TEXT WILL BE RED</*font>, unsafe_allow_html=True)

Just delete both *'s inside the font blocks.