Re:Dark mode in a website with CSS
by jacobolus on Tuesday October 08, 2019 @09:15PM
(#21199039)
> Solution: use CSS filter:invert for images
> Solution: filter: invert(1) hue-rotate(180deg);
This might be nominally acceptable, but itβs going to be pretty mediocre. Both of these methods dramatically distort color relationships from the original.
Getting someone to explicitly pick colors that work in dark mode will yield much better results. (Of course, takes a lot more manual work by an expert, instead of a few automatic text replacements.)
> Solution: filter: invert(1) hue-rotate(180deg);
This might be nominally acceptable, but itβs going to be pretty mediocre. Both of these methods dramatically distort color relationships from the original.
Getting someone to explicitly pick colors that work in dark mode will yield much better results. (Of course, takes a lot more manual work by an expert, instead of a few automatic text replacements.)