I have a VueJS project in which I use SVGs with a hardcoded color, I try to give these SVGs another color by looping over them using mask and rect tags. This works, but I see that the higher the icon index gets, the lighter the color of the icon becomes. What am i doing wrong?
Here is the codepen example;
https://codepen.io/Kesselfest/pen/xxEZyBb
And the HTML template;
<template>
<div id="app">
<div class="flex-container">
<div v-for="icon in icons" :key="icon.name">
<div class="iconTile"> <svg viewBox="0 0 36 36">
<mask :id="`${icon.name}-mask`">
<image :href="icon.location" x="0" y="0" width="100%" height="100%" />
</mask>
<rect x="0" y="0" width="100%" height="100%" :fill="icon.color"
:mask="`url(#${icon.name}-mask)`" />
</svg> </div>
</div>
</div>
</div>
</template>