Instead, you can use ion-segment component to change the UI of the current page with binding that button's value to background color.
As in docs you can manipulate like this for your sake. You can manipulate the UI according to your needs. Does that answer your question ?
<div padding>
<ion-segment [(ngModel)]="examType">
<ion-segment-button value="CPO">
CPO
</ion-segment-button>
<ion-segment-button value="CHSL">
CHSL
</ion-segment-button>
</ion-segment>
</div>
<div [ngSwitch]="examType">
<ion-list *ngSwitchCase="'CPO'">
<div class="background-color-cpo"> </div>
</ion-list>
<ion-list *ngSwitchCase="'CHSL'">
<div class="background-color-CHSL"> </div>
</ion-list>
</div>