How can i add Color to Textarea Value ? i am able to add color to label not to value

Summary

Share a clear and concise description of the issue. Aim for 2-3 sentences.

Steps to reproduce

Code snippet:

st.text_area("Enter Input :blue[text to be colored] prompt or Click on Create Prompt :",value="red[text to be colored] ",key='qres',height=200)

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

Value should display in Red text.

Actual behavior:

Not changing colour

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.

Links

  • Link to your GitHub repo:
  • Link to your deployed app:

Additional information

If needed, add any other context about the problem here.

Hey you can check out this Thread about changing the color of text area…

Sure,
I want to color some of the text in Text Area .

Ex : Test Case: Policy Details Verification, Change, and Comparison , i want to display Policy details in Blue color

I am able to change color of label but not the text inside text area. Is there anyway i can achieve this

You can create a custom component using HTML and CSS and use it in your streamlit app

Thank you, i am newbie here, can you please provide steps or point out to me to some link

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.