Change the color of text of TextArea

Just need a simple way to set the color of text in a TextArea object. Preferably programmatically, thanks!

for example

colors=['red', 'green','blue']
text_area_1.foreground=random.choice(colors)
2 Likes

Thanks @joinlook. :slight_smile:

@joinlook, as a bonus… how do you know the list of available colors? Is there a way to set from a hex value as well?

:slight_smile:

yes any hex value in this format
#ffffff

also text_area.foreground=‘rgba(100,20,30, .8)’

2 Likes

Thank you so much! @joinlook