How to get primary or accent color of currently applied theme in angular material 2

Discussão em 'Angular' iniciado por Rahul, Dezembro 17, 2024.

  1. Rahul

    Rahul Guest

    I'm building an app with multiple theme with angular material design 2. I created multiple theme and it's working really great. Using this guideline : Angular Material design theme

    But the problem is that if user select "green theme" for example. Then I want to display his/her name in green and so. But how can I get the currently selected theme in this case "green" in my component style and then use that primary variable in my user name class to change its color

    Continue reading...

Compartilhe esta Página