The most straightforward way I can think of to handle this is to have some sort of property on each d object that indicates the color, and whenClick() should modify it accordingly.
<button ion-button *ngFor="let d of ds; let i = index" (click)="changeColor(i)"></button>
Including let i = index gives you some power to start accessing specific buttons just by tracking the index. There’s more to it, but that’s a good head start