upvote

   filter: invert() hue-rotate(180deg)
For images. Works better for illustrations to get the vibe of the original colours than actual photographs.
reply
Yep! That’s what is my dark mode userscript too. Reference for anyone interested in more details. https://monochrome.sutic.nu/2024/02/25/hue-preserving-invert...
reply
Please do not use invert; it messes up subpixel rendering, making text ugly and harder to read.
reply
The opt outs mentioned in the article, like

    color-scheme: light dark;
should be sufficient to enable dark mode for users who prefer dark mode.

For icons, ideally they’d be SVGs controlled by currentColor, but that may not be feasible or convenient depending on your setup.

reply