Could you maybe share a code snippet of what you mean/working on exactly?
I’m unsure what kind of error you’re expecting the user to run into, or what kind of error you’re running into currently which makes your application forget the selected color.
Do you already save the color choice in a session state variable?
Cause putting it in session_state is as simple as something like:
import streamlit as st
if "color" not in st.session_state:
st.session_state.color = "Red"
color = st.radio("Select a color", ["Red", "Green", "Blue"])
st.session_state.color = color
st.write("You chose: ", st.session_state.color)
For now, if you refresh a Streamlit page it will always reset everything because you’re basically making a new connection to the application. There’s no browser/cookie based storage yet.
If you would like to persist things for a user it would be best to save the color to a database and retrieve it for the user on login.