Is this the best way to set the color of svg files?

Forgive me if I'm missing something much simpler & obvious. Is this a good way to make svg path change colors? I tried various methods but couldn't set the color of the svg path from CSS.

CSS code:

:host {
    --line-width: 2px;
    --svgcolor: #9c9c9c;
}

label {
    font-size: 8rem;
    background: var(--svgcolor);
    -webkit-mask-image: url();
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: 50% 50%;
    -webkit-mask-size: 60px;
}