sandoche / Darkmode.js

🌓 Add a dark-mode / night-mode to your website in a few seconds
https://darkmodejs.learn.uno
MIT License
2.72k stars 176 forks source link

Undo hue inversion #5

Closed seahorsepip closed 4 years ago

seahorsepip commented 5 years ago

By rotating the hue with 180 degreess, the original hue of elements can be retained in dark mode :)

filter: hue-rotate(180deg);
seahorsepip commented 5 years ago
backdrop-filter: hue-rotate(180deg);

Seems to do the job but it's rather buggy: no smooth transition and only works on the top left quadrant of the page. Maybe an svg filter works better?

sandoche commented 4 years ago

You can also use this mix-blend-mode: difference;