Each checkbox in my list is assigned to a different department, with each department having its own color. When a box is unchecked, only the border is in the color of the department. When checked, the background changes to the assigned color https://i.sstatic.net/RBTIk.png
The box-shadow works as expected, but I am unable to make the background change (it stays blue-ish). Here is my current code:
<label class="custom-control custom-checkbox" *ngFor="let department of departments">
<input type="checkbox" class="custom-control-input" [ngStyle]="{'background-color':checked===true? department.color:'white'}">
<span class="custom-control-indicator" [ngStyle]="{'box-shadow': '0 0 1px 1px' + department.color}"></span>
<span class="custom-control-description text-capitalize">{{department.id}}</span>
</label>