我认为你应该能够通过篡改你的 src/styles.scss 文件来篡改哪种颜色是你的主要辅助颜色等,例如你可以这样做:
@import '~@angular/material/theming';
$custom-primary: mat-palette($mat-indigo);
$custom-accent: mat-palette($mat-pink);
$custom-warn: mat-palette($mat-red);
$custom-theme: mat-light-theme(
$custom-primary,
$custom-accent,
$custom-warn
);
@include angular-material-theme($custom-theme);
那么你应该可以使用这样的颜色:
<button (click)="gotoDashboardHome()" mat-raised-button color="custom" class="centered-button">
<mat-icon>reply</mat-icon>
<span class="button-text">Back</span>
</button>