Change background and text color
See original GitHub issueProblem
Users would like the ability to change the background color and text color of their apps.
Solution
Allow users through a simple API to change background and text color without having to pass a<style>
block into st.markdown
with unsafe_allow_html=True
or some similar process.
Additional context
Here is a forum topic requesting this feature.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:68
- Comments:12 (3 by maintainers)
Top Results From Across the Web
How to Change Text and Background Color in CSS
To change the background color of the inline text, go to the <head> section. Simply add the appropriate CSS selector and define the...
Read more >CSS Text - W3Schools
The color property is used to set the color of the text. The color is specified by: ... Look at CSS Color Values...
Read more >Change the look of text in Pages on iPhone - Apple Support
Add a background color to text · Select the text you want to change—or tap a text box or shape—then tap the Format...
Read more >Reverse Text Color Based on Background Color ... - CSS-Tricks
If you were looking for more of an accessibility-based “change the text color to make sure it has enough contrast” thing, Sass can...
Read more >Change HTML Background Color or Font Color - BitDegree
HTML Color: Text or Background ; background. By using the simple color property, you will change the color of the ; text.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 from me, although I’m more interested in changing the pink accent color to something else.
One aspect to think about should be global (app wide) changes vs. local (element wide) changes. Personally, global changes are all I need for now so the app can be adjusted for our company CI. In the future though, we might want even more control.
Next point on the menu should be the level of control. A predefined list of styling adjustments is probably enough for now but power users might be interested in editing the CSS directly. This detailed level of control could lead to something like Themes. Somebody was looking for essentially a dark theme of Streamlit but we all know that a dark theme involves more adjustments than just changing the background and font color.
Elements I would like to style/adjust right now:
but how to add this code <‘(Using this template for CSS & HTML)’> in your app streamlit
’