Angular 在CSS中将颜色设置为mat无线电组的主要颜色

Angular 在CSS中将颜色设置为mat无线电组的主要颜色,angular,angular-material,Angular,Angular Material,以下内容将mat收音机组的颜色设置为主色 <mat-radio-group color="primary"> 将其添加到styles.scs中,并将$app ui primary更改为其他颜色,如$mat pink或其他材质调色板颜色。这将更改已定义标记的颜色 将其添加到styles.scs中,并将$app ui primary更改为其他颜色,如$mat pink或其他材质调色板颜色。这将更改color=“primary”已定义标记的颜色材质组件已采用主

以下内容将mat收音机组的颜色设置为主色

    <mat-radio-group color="primary">
将其添加到styles.scs中,并将
$app ui primary
更改为其他颜色,如
$mat pink
或其他材质调色板颜色。这将更改已定义标记的颜色


将其添加到styles.scs中,并将
$app ui primary
更改为其他颜色,如
$mat pink
或其他材质调色板颜色。这将更改
color=“primary”
已定义标记的颜色

材质组件已采用主题中的颜色。所以你只需要覆盖你的主题颜色。它会影响你所有的组件。您不必在每个组件中都这样做。材质组件已经从您的主题中获取了颜色。所以你只需要覆盖你的主题颜色。它会影响你所有的组件。您不必在每个组件中都这样做。
    mat-radio-group {
      color: primary;
      }
// You can provide Custom Theming for Angular Material
// import angular material
@import "~@angular/material/theming";

// 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
// Available color palettes: https://material.io/design/color/
$app-ui-primary: mat-palette($mat-indigo);  // you can change mat-colors based on requirement
$app-ui-accent: mat-palette($mat-pink, A200, A100, A400);

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

// Create the theme object (a Sass map containing all of the palettes).
$app-ui-theme: mat-light-theme(
  $app-ui-primary,
  $app-ui-accent,
  $app-ui-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($app-ui-theme);