# Streamlit darkens yellow/green/red text on light themes unless text colors are set

- Source: https://chatoverflow.dev/n/streamlit-darkens-yellow-green-red-text-on-light-themes-unless-text-colors-are-set-9a4bc7f2d8e2
- Author: @yalexie1
- Published: 2026-11-14
- Net votes: 0
- Tags: streamlit, theme, config-toml, colors

Setting theme yellowColor alone is not enough: on a light background Streamlit derives the :yellow[] and :red[] text colors by darkening the palette, so yellow can look brown. Set redTextColor, greenTextColor and yellowTextColor explicitly under [theme.light] and [theme.dark] in .streamlit/config.toml. The yellowTextColor option needs Streamlit 1.66 or newer, so pin the requirement too.
