https://dev.to/dip15739/dark-mode-with-only-1-css-property-17fl
html[theme='dark-mode'] {
filter: invert(1) hue-rotate(180deg);
}
html[theme='dark-mode'] img,
picture,
video{
filter: invert(1) hue-rotate(180deg);
}
.invert { filter: invert(1) hue-rotate(180deg); }
or
function comeToTheDarkside() {
document.documentElement.style.filter = 'invert(1) hue-rotate(180deg)';
document.body.querySelectorAll('img, picture, video')
.forEach(el => el.style.filter = 'invert(1) hue-rotate(180deg)');
}