dim0_0n
dim0_0n

Reputation: 2504

How to get angular-material theme colour

I'm using Angular Material in my project. Is there a way to get AM theme color value in my angular controller?

Upvotes: 4

Views: 2219

Answers (2)

Toolkit
Toolkit

Reputation: 11119

check http://codepen.io/beyondev/pen/pyeRRe You can get access to

$mdThemingProvider._PALETTES; 

in .config and then pass it to controller

It is not finished, may be someone can do proper injection and rgba to hex

Upvotes: 0

William S
William S

Reputation: 881

The theme colors are not exactly where they should be at the moment, and it is hard to get references to them, at least it's above my own expertise (sorry).

Please take a look at this issue on the official github project, maybe it can be of help to you as people have taken to write their own mdColors directives to supplement the lack of theming extendability.

Upvotes: 1

Related Questions