Did you try "Dark Reader"? It solved these issues for me on Linux/Chrome and iOS. Apart from having a rather smart automatic dark mode you can also do a "black" mode which is great for Oled displays as it replaces tinted or dark gray backgrounds with true black.
It even has different modes of operation - static, filter, and dynamic.
Static and Filter modes are really light on CPU, but tend to break on complex JavaScript-driven sites. Dynamic mode uses a bit of CPU, but works well for most complex sites, including Google Docs, Google Maps, GMail, Google Drive and many others that I have used.
I’ve been using Dark Reader on desktop for a couple of years but had no idea they had an iOS Safari extension. I’ve been using Noir[1] on iOS, which does the trick, although perhaps not as customisable as DR.
Dark Reader and other extensions aren't necessary. Chrome has built-in functionality (since v78) to turn every website dark and works flawlessly on 99% of sites.
This is what I use, and it works really well on a simple site like this one.
In Chrome, go to chrome://flags and search for Auto Dark Mode for Web Contents and select "Enabled" (or a similar option, I prefer "Enabled with increased text contrast" sometimes.)
That said, it shouldn't be hard for the site to add a bit of css like:
@media (prefers-color-scheme: dark) {
...
and thus respect the preferences of the users without having to resort to using a specific browser, plugins (whose code may or may not have vulnerabilities), or whatever user hacks we can come up with. (@dang, what do you think?)
I'm not sure "flawless"is the appropriate term.
I haven't turned it off yet. But there are some sites that have become difficult to use. And other sites just look odd.
Please add a dark mode under user settings. We read HN on different devices, with different browsers and under different OSes, having a central/official way to do this would be highly appreciated.
There is a user setting for topcolor in our profile, why not another one for bgcolor?
HN has terrifically simply markup, your user agent should be able to display it however you would like with relatively little configuration. What user agent are you using? All the popular ones that I'm familiar with (Firefox, Chrome derivatives) have addons or plugins for changing the appearance of websites. In Firefox you can even add rules to userContent.css without an addon.
Just for an example, here is my userContent.css for highlighting the five languages that I use most frequently in Google Translate.
On windows 10 I turned on the invert colors shortcut key (in the 'color filters' setting page) which is ctrl+Win+c, for a quick fix for anything blowing out the my eyes. That it's instantaneously, one-handedly on or off makes the short term inversion of the tab bar etc feel ok. Most fonts surprisingly look just as good flipped but... the hn one is not a good example
It used to be possible to invert OSX colors with a keyboard shortcut like cmd-ctrl-8 but it's not on by default anymore (still possible to enable it from the keyboard shortcut settings).
A little off-topic but I recently removed Dark Reader from my Firefox provisioning as it always opened custom webpage to "greet" me. Also, some hacky-wacky disables "Remove Extension" menu position for this plugin.
Every major browser supports the prefers-color-scheme media query and has done so for a number of years. It really isn’t acceptable anymore to present a style that disrespects this setting.
iOS does support that kind of extension. There's an extremely good app for creating/editing the custom CSS/JS https://github.com/quoid/userscripts and it can even sync with your other iDevices/Macs over iCloud.
EDIT: Maybe Userscripts' UI doesn't have an integrated text-editor when running on iPhone. It definitely does when running on Mac, and possibly on iPad.
iPhone browser extensions can only run in the Safari app, not inside other apps that embed it. I read HN through Feedly (which displays each article inside the app), and there’s no way to do any user customization.
https://chrome.google.com/webstore/detail/dark-reader/eimadp...