We now have a built-in feature to use colored text in st.write
, st.markdown
, st.header
, etc (also works in widget labels!):
st.markdown("This is black and :red[this is red!]")
You can use the colors blue, green, orange, red, violet, gray/grey, and rainbow in the same way. See also the docstring of the body
parameter. There’s no built-in way to chang the font size currently.