Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Material] Add ability to swap color palettes #938

Open
kazo0 opened this issue Feb 24, 2023 · 2 comments
Open

[Material] Add ability to swap color palettes #938

kazo0 opened this issue Feb 24, 2023 · 2 comments
Labels

Comments

@kazo0
Copy link
Collaborator

kazo0 commented Feb 24, 2023

We should be exposing some sort of way to "switch" color palettes at runtime. Example: a user could be presented with several options for the main color of the app theme

image

In doing so, we'd need a way to re-initialize the MaterialTheme with the chosen color as an override for something like PrimaryColor.

Not sure how smooth this process would be at runtime, we may need to force a refresh of all ThemeResources by doing something like toggling the ApplicationTheme

@kazo0 kazo0 added kind/enhancement New feature or request theme/material labels Feb 24, 2023
@Xiaoy312
Copy link
Contributor

@kazo0 would the proper implementation of lightweight styling enable us to achieve this?
CC @agneszitte

@kazo0
Copy link
Collaborator Author

kazo0 commented May 27, 2023

We could do it that way, I was hoping we could be able to replace the current color overrides with a new set of base colors.

Unfortunately overriding things like PrimaryColor locally doesn't update lightweight styling brushes that alias other brushes based on that resource. So you need to reinitialize all of the resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants