Following https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs
Open your SVG file in a text editor. Find a with a dark or missing fill. Add a CSS media query that will trigger on theme changes and change fill to the colors you want:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">