light darkmode favicon code example
Example: dark mode favicon
/* HTML */
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
/* SVG image */
<svg width="50" height="50" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
<style>
rect {
fill: green;
}
@media (prefers-color-scheme: dark) {
rect {
fill: red;
}
}
</style>
<rect width="50" height="50" rx="5"/>
</svg>