如何更改Angular Material中的调色板?

时间:2017-07-17 18:59:19

标签: angular themes angular-material angular-cli

在我的angular4项目中,使用angular-cli构建,我有以下scss自定义主题可以正常工作:

@import '~@angular/material/theming';
// Plus imports for other components in your app.

// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat-core();

// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue.
$mf-app_primary: mat-palette($mat-indigo);
$mf-app-accent:  mat-palette($mat-pink, A200, A100, A400);

// The warn palette is optional (defaults to red).
$mf-app-warn:    mat-palette($mat-red);

// Create the theme object (a Sass map containing all of the palettes).
$mf-app-theme: mat-light-theme($mf-app_primary, $mf-app-accent, $mf-app-warn);

// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include angular-material-theme($mf-app-theme);

直接从教程中复制。

我不明白如何更改此文件中的颜色。我想导入自己的调色板。我是否必须更改材料中的调色板文件?我需要什么格式/语法? cli构建中的palette.scss在哪里?

0 个答案:

没有答案