Skip to content

Commit ac4b231

Browse files
authored
Add theme text color config options (streamlit#12438)
Add configurable text colors for theming: - `redTextColor` - `orangeTextColor` - `yellowTextColor` - `blueTextColor` - `greenTextColor` - `violetTextColor` - `grayTextColor` **Order of precedence:** * Uses configured `redTextColor` * If there is no configured `redTextColor`, derives it from a provided `redColor` (darkened by 15% for light theme and lightened by 15% for dark theme) * If neither, falls back to default
1 parent 6f5ef1e commit ac4b231

20 files changed

+1026
-108
lines changed
305 Bytes
Loading
44 Bytes
Loading
276 Bytes
Loading
27 Bytes
Loading
-62 Bytes
Loading
52 Bytes
Loading
129 KB
Loading
188 KB
Loading
153 KB
Loading

e2e_playwright/theming/custom_background_colors_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
def configure_custom_theme_background_colors():
2828
"""Configure custom theme background colors."""
2929
# Also set some main colors for better contrast with background colors
30+
# these will trigger derived text colors as well
3031
os.environ["STREAMLIT_THEME_RED_COLOR"] = "#750000"
3132
os.environ["STREAMLIT_THEME_GREEN_COLOR"] = "#008000"
3233
os.environ["STREAMLIT_THEME_GRAY_COLOR"] = "#525252"

0 commit comments

Comments
 (0)