tchang
1
Hi guys, really noob question, but the streamlit documentation Iāve been reading on colored text doesnāt seem to work.
st.write("This is :blue[test]")
Returns the exact string instead of āThis is testā with test being colored blue.
However, emojis and typography work just fine. What am I doing wrong?
tchang
3
Ah! Iām on 1.14 still. Thanks!
1 Like
Ville
4
Is it possible to color printed string variables? For example
st.write("temprature: " + str(temprature))
what Iāve tried so far, I can only color the written out text in the code
Yes, it is. Here is a way to do it with f-strings, which are a bit nicer than just using + to stick strings together
temperature = "-10"
st.write(f"temprature: :blue[{temperature}]")
1 Like
system
Closed
7
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.