How to change ion-item-divider color dynamically?

I’ve tried to use
<ion-item-divider [color]="data.color"> or
<ion-item-divider [ngClass]="data.color">
but not work.

<ion-item-divider [style.background]="data.color">

<ion-item-divider [style.background]="data.color">
Still not work for me
<ion-item-divider [style.background]="'light'">

Still you use the code without logic. I can’t help you, you must start to read documentation. Sorry

I’ve found the value of style.background must be set to color codes! thanks!

this.data.color = '#CC6699'
<ion-item-divider [style.background]="data.color">

or
<ion-item-divider [ngStyle]="{'background-color':data.color}">