Dynamically change button color

Then you can

A. Make classes for your colors and do

<button ion-button [ngClass]="buttonClass" (click)="someAction()"></button>

B. Set the styling directly

<button ion-button [style.backgroundColor]="buttonColor" (click)="someAction()"></button>

Or C. Add the colors you wish to use in the colors array, and have buttonColor return the name of the color in that array.