Hacker News needs a Dark Mode

  • I know you mentioned you don't like extensions, but for those that don't mind Dark Reader is really useful:

    https://darkreader.org/

    I have it setup to enable according to the system. Also, I use the whitelist mode, so I enable on specific websites instead of having it enabled for every one automatically.

    It's available on mobile via Firefox for Android!

  • If you're using ublock origin, I have these filters which I copied from another HN comment once upon a time.

    news.ycombinator.com##html:style(filter:invert(100%) hue-rotate(180deg))

    news.ycombinator.com##body:style(background: white)

    news.ycombinator.com##div.toptext:style(color: black)

    news.ycombinator.com###hnmain td[bgcolor="#000000"]

    edit: "rules" -> "filters"

  • https://news.ycombinator.com/item?id=23197966

    And probably a dozens more with 100+ comments and hundreds more with a few comments.

    At this point I have simply given up.

  • Never understood the point of dark modes. Am I too old?

  • Thank you all for your enthusiastic responses!

    I was sorry to learn that this feature request hasn't seen much traction. However @ksec gave me an idea by linking me to an earlier thread on this very same topic in which somebody suggested that we just create a patch for the existing news.css file.

    Not sure why this thread got flagged, but I took it upon myself to create a patch for the existing news.css file as well as producing a new news.css file with dark mode support:

    Patch: https://pastebin.com/Gwq5WSwX

    Full File Pre-Patched: https://pastebin.com/Nd7JDLLT

    Again, all thoughts and criticisms of this work will be welcomed.

    Please help those of us with a dark mode preference enjoy this website more by implementing these changes (after a proper code review of course, as I would expect nothing less from fellow hackers)

  • Note: extensions don't help for those of us on mobile browsers that don't support extensions.

    And dark mode is most important/applicable when browsing on your phone before bed.

    Ideally HN would just follow the user's dark mode OS-wide setting.

  • > Note: Telling me to load up some browser extension to handle it is a bit silly as it requires me to implicitly trust the author of said extension which will see and have access to virtually everything on every website I enable it for

    If the extension asks for permissions to all websites instead of just this one, then yes.

    Also, "hackers" fix things like this themselves.

    Also also, I may be reacting strongly to this because I don't like dark mode, or the assumption that I should because I'm a "hacker".

  • > Hackers like dark modes.

    Certainly not all hackers like dark modes. But I doubt anyone would object to such a thing existing as an option.

  • Dark Reader has a sepia-mode as well as night-mode. I remember reading some pg essay about how he patched a customer's issue with lisp while the customer was still on the phone... but still no night-mode after 10 years of begging, oh well, first world problems I guess.

  • "Hackers like dark modes"

    Not all programmers like dark mode. Some people with astigmatism have problems with dark mode.

    Dark Mode Isn’t ‘Easier on the Eyes’ for Everybody (2019) https://www.vice.com/en/article/ywyqxw/apple-dark-mode-eye-s...

    Extract:

    > As Gizmodo wrote in 2014, citing research by the Sensory Perception and Interaction Research Group, at University of British Columbia, white backgrounds act as a "crutch" for astigmatic eyes: "People with astigmatism (approximately 50% of the population) find it harder to read white text on black than black text on white."

  • Related: Does anyone know why Hacker News is so... rudimentary? It doesn't have pagination and lacks accessibility features.

    I understand why it's kept simple but for a tech related forum it's suprisingly clunky.

  • Is this one dark enough for you ? [0]

    I call it `links https://news.ycombinator.com/item?id=36342085`

    Oh and don't tell me you're a hacker if you've never tried Hacker News in the terminal emulator. Dark, Perfectly dark, Green-dark \o/

    [0] https://ibb.co/QHLWHZm

  • If you welcome criticism, then here it is: I find your generalization particularly silly ("Hackers like dark modes"). You could have just asked (begged) for a dark mode without invoking a fallacious argument.

  • Why not just use https://www.darkhn.com/

    Works for me.

  • I made this 3 years ago: https://jgthms.com/hacker-news-dark-mode/

    I submitted it to HN: https://news.ycombinator.com/item?id=23203347

  • This is a reason third-party apps are useful. I use a random app I got off f-droid and it has a dark mode.

  • You can tweak it with plugins or extensions, you're a hacker, aren't you?

    Also, the dark mode is extremely hard to read for some people (specially older people).

    It causes you pupil to dilate (less light on the eyes) and shifts the focus point on the retina slightly.

    Don't get me started on transparencies...

  • My favorite HN dark theme doesn't seem to be available any longer in its original form, but luckily I was able to save it.

    https://github.com/duiker101/hackernews-dark-amethyst

  • Funny that I've been on this site for years yet I don't actually know if it's open source. Does anyone know whether it is and if it's open to pull requests? This sounds like it would be a fun project I could knock out in a weekend or so.

  • If you want, I have a dark-ish theme for HN that I've made with Stylus, it mimicks the Synthwave84 theme for VSCode

    https://github.com/oxodao/synthwave-themed-sites

  • If you’re using the Arc browser, try out this Boost: https://arc.net/boost/E4A26AD9-F0FF-4247-AEAE-27D071FB546B

  • what many of those hackers don't realize, it's that their dark mode theme is very hard to read at low brightness levels, so when they switch to some light windows, it pokes their eyes out obviously.

    instead of forcing everything to be configured for dark theme, it would be a lot simpler to just drastically lower the brightness at night and keep using light themes.

    one trick is to lower the brightness slightly dimmer than comfortable and let your pupils take 2-3 seconds to adapt.

    another trick, on iOS/macOS, if you combine this with true tone and night shift, then your eyes will be strained even less!

  • I understand not trusting random developer, which means your only option is to create your own extension. Shouldn't be that hard, considering the scope of what's needed.

    Provided you're a web developer, of course.

  • Just use a userstyle?

  • http://hn.premii.com supports lots of options in addition to dark mode

  • It is trivial to do. Just write the extension yourself. Won't take more than 15 minutes with ChatGPT.

  • I made a Stylus theme for https://news.ycombinator.com and https://hckrnews.com

    https://i.imgur.com/b08pZev.png

    * https://addons.mozilla.org/en-US/firefox/addon/styl-us/ Stylus Button > Manage > Write New Style > Import

    * https://gist.github.com/Zren/d025e06754bb2e0a7de0036fb2eee3f...

    I personally disable all extensions except uBlockOrigin from auto-updating. If they break, then that prompts me to re-check if they're legit or if they've been bought out (like Stylish) before updating.

  • If you don’t mind using an alternative front-end, I’ve built an open source one[0] that supports dark mode and some other things I was missing when using HN on larger screens

    0. https://modernorange.io

  • Here's my custom dark mode CSS if anyone enjoys the google dark mode aesthetic (I inject with the "Stylus" extension, avoid "Stylish" extension at all costs): https://pastebin.com/CsVkRbYM

    Also my CSS for hckrnews.com (my preferred homepage UI): https://pastebin.com/SLRrY9gn

    Looks like this: HN - https://i.imgur.com/P6rDgR8.png hckrnews.com - https://i.imgur.com/HfjOAYW.png

  • Poor man's dark mode: invert colours on your phone.

  • Brave has the built-in dark mode

  • Anything that requires adding even a single line of JS to HN is gonna be a hard no from me.

  • Plus one for dark mode.

  • [dead]

  • [flagged]