Add main theme color config options#12288
Merged
mayagbarnes merged 14 commits intodevelopfrom Aug 28, 2025
Merged
Conversation
Contributor
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
Contributor
✅ PR preview is ready!
|
0b4437b to
68b1b17
Compare
571b414 to
029465c
Compare
e2e3b37 to
072dc24
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds seven new configurable main theme color options to Streamlit's theming system. These colors can be customized for both the main application and sidebar, providing developers with greater control over their app's visual appearance.
- Adds seven new color configuration options: red, orange, yellow, blue, green, violet, and gray
- Updates theme processing logic to handle the new main color configurations
- Includes comprehensive test coverage for the new color options
Reviewed Changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| proto/streamlit/proto/NewSession.proto | Adds protobuf definitions for the seven new color fields |
| lib/streamlit/config.py | Defines the new theme color configuration options with descriptions |
| frontend/lib/src/theme/utils.ts | Updates theme creation logic to apply the new main colors |
| frontend/lib/src/theme/utils.test.ts | Adds comprehensive unit tests for main color functionality |
| lib/tests/streamlit/runtime/app_session_test.py | Updates session tests to include new color configurations |
| lib/tests/streamlit/proto_compatibility_test.py | Updates proto compatibility tests for new fields |
| lib/tests/streamlit/config_test.py | Adds configuration tests for the new color options |
| e2e_playwright/theming/custom_main_colors.py | Creates test app demonstrating custom main colors |
| e2e_playwright/theming/custom_main_colors_test.py | Adds E2E test with custom theme color configuration |
lukasmasuch
reviewed
Aug 28, 2025
| "redColor", | ||
| categories=["theme", CustomThemeCategories.SIDEBAR], | ||
| description=""" | ||
| Color used as main red color. |
Collaborator
There was a problem hiding this comment.
In case we derive the background and text color from the main color, we should probably mention it here as well. But I assume that's probably part of a follow-up PR.
lukasmasuch
reviewed
Aug 28, 2025
sfc-gh-mbarnes
approved these changes
Aug 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Add configurable main colors for theming:
redColororangeColoryellowColorblueColorgreenColorvioletColorgrayColorTesting Plan