The manual is available on the documentation website here .
First, you define palettes for your theme, such as $primary , $accent , $warn (they have the prefix $candy-app- ), and then create a $theme object:
// Create the theme object (a Sass map containing all of the palettes). $theme: mat-light-theme($primary, $accent, $warn);
Once we have a theme that contains all the palettes, we can get a foreground palette in front of it:
$foreground: map-get($theme, foreground);
In the $foreground palette, we can get any values ββbased on the key, for example
secondary-text: rgba(black, 0.54),
or
text: rgba(black, 0.87)
Here is the code to retrieve the secondary-text property:
color: mat-color($foreground, secondary-text);
I switched to 2.0.0-beta.3 from 2.0.0-beta.2 , and the folder structure looks different, you're right. Now the file \node_modules\@angular\material\_theming.scss , _palette.scss missing. You can do a global search: '$ mat-dark-theme-background: ('
_theming.scss has all colors, maps, and all functions like mat-color