Where the colours of an SVG live
An SVG describes shapes, and each shape has a fill (its inside) and a stroke (its outline). The colours are written in the file, as attributes or styles. That is why an SVG can be recoloured without redrawing anything, and without losing any sharpness.