Ask HN: How can I browse HN in dark mode?

13 points by herodoturtle ↗ HN
For the fellow parents, some fun context: My toddler is asleep on me, and this light is blinding.

35 comments

[ 2.7 ms ] story [ 24.1 ms ] thread
Darkreader extension in Firefox
Dark Reader extension for Chrome.
On Android, Vivaldi supports dark more out of the box. It's actually just a toggle for the dark mode present on any chromium-based browser, and you can enable it globally in any of them in chrome://flags/#enable-force-dark

Dark Reader, often recommended, is very slow, especially on old hardware. This built-in mode is much more efficient and works well on vast majority of pages.

Dark Reader's slowness primarily stems from its auto-detection of pages that need darkening. If you turn that off and manually enable it on pages that need it, it doesn't feel any slower than anything else
That flag doesn't seem to work for me in android chrome or brave, when enabled HN is still very much light mode
Dark Reader extension in Safari.
Use the firefox extension "Dark Background and Light Text".
If you're on one of the betas for about-to-be-released apple OS’s, there's a new describe an extension functionality and building a dark mode for HN is exactly what I just used it to do. Super easy, and synced across all my devices.

I know this sounds like an ad, but I was pretty impressed with it

Great idea! I tried this just after reading your comment, 20s later I had a working extension that does exactly this for HN.

Thank you!

In uBlock Origin -> My Filters:

    # HN dark Mode:
    news.ycombinator.com##body:style(background: black)
    news.ycombinator.com##td:style(color: #fafafa !important)
    news.ycombinator.com##table:style(background-color: #24273a)
    news.ycombinator.com##div.toptext:style(color: #fafafa)
    news.ycombinator.com##div.c00:style(color: #fafafa !important)
    news.ycombinator.com##a:style(color: #ffa000 !important)
    news.ycombinator.com##span#karma:style(color: #faa000 !important)
    news.ycombinator.com##span.pagetop:style(color: #fafafa !important)
    news.ycombinator.com##textarea:style(color: #696969 !important; background: inherit; )
    news.ycombinator.com###hnmain:style(background: #24273a !important)
I am using Stylus and this theme:

    body {
        background-color: #262626 !important;
    }

    body > center > table, input, textarea {
        background-color: #222 !important;
    }

    body > center > table > tbody > tr:first-child > td {
        background-color: #ff6600 !important;
    }

    /* Bright text */
    td.title a:link, span.comment font, span.comment font a:link, u a:link, span.yclinks a:link, body:not([id]),
    td:nth-child(2):not(.subtext) > a:link, input, textarea, p > a, a > u, .c00, .c00 a:link,
    a[href="http://www.ycombinator.com/apply/"], a[href="https://www.ycombinator.com/apply/"] {
        color: #ccc !important;
    }

    .admin td {
        color: #aaa !important;
    }

    /* search box and comment box */
    input, textarea {
        border: 1px solid #828282 !important;
    }
Stock Dark Reader browser extension works well for me.
I used "Override colors" under Settings -> Accessibility to set nice dark colors.

Then I used userChrome.js from https://github.com/AlexVallat/firefox-scripts/ to add a button which toggles the browser preferences "browser.display.use_system_colors" and "browser.display.document_color_use", so I can still access bright mode if needed.

iOS accessibility shortcut: 3 taps on sleep button inverts the colors of any website, if you set it up.
Opera browser supports it natively