I am designing progress bar showing how much delivery is completed in percentage. I am able to design the the progress bar, but I don't know the way to change the text font color depending on bar's background color.
<div class="progress">
<div class="bar" [style.width.%]="row[column?.value]">
</div>
<div class="percent-container">
<p class="percent">{{row[column?.value]}}%</p>
</div>
</div>
In above image '50' should display in white and percent symbol in black, If backgound is completely blue i.e 100% then entire text should display in white.
I am getting output like this, but i need inverting font color depending on background
The width will vary for each record in table. Here is sample codepen link: https://codepen.io/Surendra_Mourya/pen/NWdpMep