Created
November 19, 2019 16:50
-
-
Save phoebejaffe/a41458c3bb286a8f6a79786b836a002d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
filter: brightness(0.8) contrast(130%) invert(100%) brightness(1.5) hue-rotate(180deg); | |
} |
In JavaScript:
const style = document.createElement('style');
style.textContent = 'html, img, video {filter: invert(100%) hue-rotate(180deg);}';
document.head.appendChild(style);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't account for images. For a less-good dark mode that handles images properly, try:
Basically inverts everything, then inverts images and videos a second time, thus bringing them back to normal.