import streamlit as st
st.html(
"""
<style>
.clickable {
color: rgb(46, 154, 255);
text-decoration: underline;
}
div[data-testid="stChatMessageContent"] {
background-color: #ffd9b3;
color: black; # Expander content color
}
div[data-testid="stChatMessage"] {
background-color: #ffd9b3;
color: black; # Adjust this for expander header color
}
</style>
""")
with st.chat_message(name='user'):
st.write('Hello User')
with st.chat_message(name='assistant'):
st.write('Hello assistant')
Hi @blackary , I’m trying to customize my Streamlit chatbot by applying different background colors for the user and assistant messages to improve readability. However, I’m unable to get it working.
Could you suggest how I can apply different custom background colors for the user and assistant messages? Thanks!