Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> HN should be dark mode by default

A less controversial solution would be to simply hook into the user's system-level light/dark setting: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...

That said, I've wanted this feature desperately for a long time. Browsing HN on my desktop monitor in the evening is blinding and gives me a headache. I find myself resizing the window to be phone-sized just so my eyes are assaulted with less light.

If you need a hand with the CSS, I'd be happy to write it myself (speaking of which; is HN open-source?)



Thanks, I'll look into that, and you're welcome to ping hn@ycombinator.com about it.

If it's simple to add and isn't going to break anything for anybody, we'd be happy to.

Edit: ok, as I understand it, it's simple enough to add except that you have to figure out what the color scheme for dark mode should actually be. Is that accurate?

Edit: see https://news.ycombinator.com/item?id=23199062.


I have to say - if your monitor is blinding you, you have it set to too high a brightness. You're doing yourself a disservice by not turning it down. It should only throw out as much light as a piece of pristine printer paper in the same orientation.

In the middle of the day my monitor tops out at about 30 of 100, and in the evenings I will occasionally turn it down to about 5 or 10. Many modern monitors will offer an option to save multiple settings, or they at least make brightness a top level configuration setting.

EDIT: Is saying "If your monitor is hurting your eyes, turn it down," really such a controversial statement?


I like having my display as bright as possible without it being uncomfortable; it helps with readability. On my laptop and phone I'll shift the brightness throughout the day to meet this heuristic, but alas, Windows does not make this trivial with an external monitor. Usually you have to fiddle with the monitor's physical buttons and navigate down into a menu. So I just don't bother.


https://twinkletray.com/

Most desktop monitors have their brightness & other config exposed via the DDC (DDC?) protocol. This is a simple UI that exposes the brightness controls on Windows. Much easier than using the buttons.

You might need to go to the monitor's menu and enable DDC if it's disabled by default.

On Linux this script works for me:

sudo modprobe i2c-dev; sudo ddcutil setvcp 10 $1 &


Thanks! I've been looking for this!

On macOS I've been using https://github.com/the0neyouseek/MonitorControl -- which also lets you use the brightness keys to control external monitors.


My monitor has terrible "buttons". This utility means I no longer have to fumble around with them to adjust the brightens. Thanks for the link!


I can't believe I'm only just now finding out about this. Do you have any idea why this isn't something built into Windows?


Windows has a brightness slider in the side bar, but it doesn't seem to work with external monitors. Probably because OS-level brightness controls were implemented when laptops became popular, and traditional PCs with external monitors became an afterthought.


That's fine, enjoy your preferences all you want.

Just realize when you use them as a justification for changing defaults which work fine for most everyone else, you're going to annoy people. Especially when your preferences tend to fly in the face of common sense.


But if you're getting eyestrain, it's by definition uncomfortable, and worth the 10 seconds or so to navigate the said menus.

Not everything has a dark mode available, so make sure that the worst case is tolerable.


Alas, these days webpages at half-brightness are often unreadable because of washed-out main text.


In my experience, low contrast text is going to have a low contrast no matter how bright or dim your computer screen is. That is, turning up the brightness will only wash out the text as it overwhelms your eyes.

It’s also an accessibility issue, but that’s a comment for a different article.


You can stop assaulting your eyes by simply installing an extension: https://darkreader.org/

It takes 15 seconds and you will have solved your problem.


Yep, came here to suggest exactly this. Especially because then it works for all sites, not just HN. I can also second Dark Reader specifically; it's nicely tunable, supports per-site toggles, and lets you set a schedule to automatically toggle dark mode in the evening. I think my only complaint is that it might be the reason why my Firefox on Android gets really slow / hangs occasionally, although that might be unrelated; haven't gotten around to testing (and it might also be the old-ish hardware and >>100 tabs, so grain of salt).


It makes FF on my high-end desktop slow too, sometimes.

In the dark reader popup window you can set the Mode; the default of Dynamic does an excellent job of making everything dark but is pretty slow. The other modes have basically no performance impact but you might see some visual bugs from time to time.


you have more than a 100 tabs on android? what device? how do you even move between?


Yeah, the tab counter hit "∞" (>99 tabs) ages ago, but they're lazy-loaded so it's just a little slower and a lot more scrolling to get to older tabs. Moto G5 Plus (XT1687), 4 GB of RAM, crDroid 6.5 (Android 10) if it matters.


>(speaking of which; is HN open-source?)

No, but also yes, but mostly no: https://news.ycombinator.com/item?id=23191206

I added themes to the Anarki forum a while ago[0], along with a quick and dirty dark theme. Please ignore the garbage quality of my PR and code, but if the HN devs want to rip it off they're welcome to.

[0]https://github.com/arclanguage/anarki/pull/171/files


I did just that in this pastebin[0].

we can even start a github repo, if anyone feels so inclined to do so

[0]: https://pastebin.com/4JYbSi5F

[edit: shorter, fixed top bar version: https://pastebin.com/dT4KKt3s ]

[edit 2: fixed textarea, dead links: https://pastebin.com/CKy4HQXE ]




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: