Angular 4+ and Angular Material 2.0.0 beta 10, Angular CLI 1.3 +
You will need to create a scss file "exampleTheme.scss", you will add it to your angular-cli.json angular-cli.json:
"styles": [
In customTheme.scss you can change your colors by using the following code:
@import ' ~@angular /material/theming'; @include mat-core(); $primary: mat-palette($mat-blue,200); $accent: mat-palette($mat-orange,200); $theme: mat-light-theme($primary, $accent); @include angular-material-theme($theme);`
Multiple Topics If you would like an additional topic, please read the manual at the end. But here is a small overview that you just need to reproduce the theme process with new variables and colors
$dark-primary: mat-palette($mat-blue,800); $dark-accent: mat-palette($mat-orange,800); $dark-theme: mat-dark-theme($primary, $accent);
and add
.material-dark-theme { @include angular-material-theme($dark-theme); }
for more details you should read the angular2 material topics guide
source share