Add custom color variables in angular material (2+)
问题 How to create "custom" own colors for angular material? For example the bootstrap like colors like success (green), warn (yellow), danger (red), beside primary (blue), accent (pink). In other words: Extend the color variablen of Angular Material (2+) for using it in html attributes: <button mat-raised-button color="success">Success</button> or create a white checkbox like: <mat-checkbox color="white">Check me!</mat-checkbox> 回答1: To add a new color named success , make the following changes