Hard refresh after changing modes to see the image change from light mode to dark mode:
Image is hosted at this gist.
SVG Code is below:
<svg fill="none" xmlns="http://www.w3.org/2000/svg">
<style>
.light-text {
fill: black;
}
.dark-text {
fill: white;
}
.light-mode-only {
display: unset;
}
.dark-mode-only {
display: none;
}
@media (prefers-color-scheme: dark) {
.light-mode-only {
display: none;
}
.dark-mode-only {
display: unset;
}
}
</style>
<text x="25px" y="25px" class="dark-mode-only dark-text">You're Using Dark Mode</text>
<text x="25px" y="25px " class="light-mode-only light-text">You're Using Light Mode</text>
</svg>