1
votes

I know I can use colors in Angular Material like so

<button mat-button color="primary"></button>

I've got two questions which I couldn't find answered anywhere.

  1. What controls other than button accept that color attribute?
  2. What colors other than primary, secondary, accent and warn are possible?

I found the Material Color guide, that talked about a lot, but not about those two questions.

1

1 Answers

1
votes

There are no other possibilities in those components for the color attribute.

But there are other possibilities for the SCSS based on the colors you've chosen for primary, accent and warn. The variations can be accessed by using the mat-color mixin as the second parameter. By using the variations, you'll be keeping the material system recommendations.

About which controls have the color attribute: I guess all the controls at the "Buttons and Indicators" section along with the "Form Controls" section on Angular material homepage (like everything else on @angular/material, it likely follows the Material Design recommendation for that).