Display text inside text box of a particular color

Hey Community members
I have a teeny doubt but I can’t find its solution.
I have a string object and i am willing to display it inside a box of black color due to my background. Kindly provide the code for it pls

Hey @Varun_Nayyar,

I posted an answer to someone a while ago about how to change the colour of just one text element. You can use the same code to change your text colour, and just hardcode the colour you want:

Happy Streamlit-ing!

Thanks a lot

1 Like