0

Is there any way to change material design theme colors just by button click?

Lets say I want my app to support personalization so every user can pick predefined theme color palette. Something similar to this: http://www.getmdl.io/customize/index.html. Is there any way to do that?

Sergino
  • 10,128
  • 30
  • 98
  • 159

1 Answers1

0

This Demo on MDL's website actually generates a brand new stylesheet whenever you pick two new colors for your theme. So you can generate different stylesheets for different themes. When the theme changed, you can remove the old style and dynamically add new style tag with the new styles in it.

Or if you use some library like react, you write your css in JS so you can change theme by change the css object in JS.